home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / CSMP Digest / volume 3 / csmp-digest-v3-126 < prev    next >
Text File  |  1995-12-31  |  95KB  |  2,579 lines

  1. C.S.M.P. Digest             Tue, 05 Dec 95       Volume 3 : Issue 126
  2.  
  3. Today's Topics:
  4.  
  5.         AOCE mailing list??
  6.         Alternative Developer Tools
  7.         Code Fragment To Identify Disk types
  8.         Control Strip Modules
  9.         Dave Marks and ints
  10.         Drag and Drop ShowDragHilite problem
  11.         Picture's Bounding Region?
  12.         Plugins?  How?
  13.         Programing For Joysticks?
  14.         Registering File Creators and Types
  15.         ResourceHandle?
  16.         Text is text is text...isn't it?
  17.  
  18.  
  19.  
  20. The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
  21. (pottier@clipper.ens.fr).
  22.  
  23. The digest is a collection of article threads from the internet
  24. newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
  25. csmp.games. It is designed for people who read news semi-regularly and
  26. want an archive of the discussions.  If you don't know what a
  27. newsgroup is, you probably don't have access to it. Ask your systems
  28. administrator(s) for details. If you don't have access to news, you
  29. may still be able to post messages to the group by using a mail server
  30. like anon.penet.fi (mail help@anon.penet.fi for more information).
  31.  
  32. Each issue of the digest contains one or more sets of articles (called
  33. threads), with each set corresponding to a 'discussion' of a particular
  34. subject.  The articles are not edited; all articles included in this digest
  35. are in their original posted form (as received by our news server at
  36. nef.ens.fr).  Article threads are not added to the digest until the last
  37. article added to the thread is at least two weeks old (this is to ensure that
  38. the thread is dead before adding it to the digest).  Article threads that
  39. consist of only one message are generally not included in the digest.
  40.  
  41. The digest is officially distributed by two means, by email and ftp.
  42.  
  43. If you want to receive the digest by mail, send email to listserv@ens.fr
  44. with no subject and one of the following commands as body:
  45.     help                                Sends you a summary of commands
  46.     subscribe csmp-digest Your Name     Adds you to the mailing list
  47.     signoff csmp-digest                 Removes you from the list
  48. Once you have subscribed, you will automatically receive each new
  49. issue as it is created.
  50.  
  51. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
  52. Questions related to the ftp site should be directed to
  53. scott.silver@dartmouth.edu.
  54.  
  55. -------------------------------------------------------
  56.  
  57. >From t89jch@sabik.tdb.uu.se (Jonas Chemnitz)
  58. Subject: AOCE mailing list??
  59. Date: 17 Nov 1995 16:46:45 GMT
  60. Organization: Uppsala University
  61.  
  62. Is there any AOCE mailing list??
  63.  
  64. /JC
  65.  
  66.  
  67. +++++++++++++++++++++++++++
  68.  
  69. >From gavin@umich.edu (Gavin Eadie)
  70. Date: Mon, 20 Nov 1995 16:35:31 -0500
  71. Organization: U of Michigan
  72.  
  73. In article <48ie9l$i66@columba.udac.uu.se>, t89jch@sabik.tdb.uu.se (Jonas
  74. Chemnitz) wrote:
  75.  
  76. > Is there any AOCE mailing list??
  77. > /JC
  78.  
  79. Yes, there is.  Send mail to AOCE-LIST@UMICH.EDU with SUBJECT of HELP ... Gav
  80. -- 
  81. Gavin Eadie // U of Michigan.
  82.             // Ramsay Consulting.
  83.  
  84. ---------------------------
  85.  
  86. >From stu6c71@bnr.ca (Tim Lahey)
  87. Subject: Alternative Developer Tools
  88. Date: Sat, 11 Nov 1995 23:12:43 -0500
  89. Organization: Bell-Northern Research
  90.  
  91. With all the talk these days about Codewarrior and Symantec, it has been 
  92. hard to find information about alternatives to these two. It will be important
  93. for me to be able to build 68K OpenDoc parts and containers. Environments I have
  94. been considering are:
  95.  
  96. QKS Smalltalk Agents 
  97. LS Object Pascal
  98. MPW Pro (I'm used to UNIX/DOS programming)
  99. Digitool Macintosh Common Lisp
  100. Prograph CPX
  101.  
  102. Of secondary importance is the ability to use Quickdraw3D but since I will not
  103. be developing immediately for PowerMac it is less important. Object Pascal
  104. seems to be a better object-oriented environment than C++. MPW would
  105. provide a familiar programming environment, and I don't like the feel of
  106. the Metrowerks environment. MCL has steep fees for the redistribution kit,
  107. and Prograph, well I never liked flowcharts to begin with.
  108.  
  109. Can anyone provide further information on the suitability of the above for
  110. 68K OpenDoc development and their programming environment ?
  111.  
  112. Thanks,
  113.  
  114. Tim Lahey
  115.  
  116. - -
  117. I speak for myself, not BNR
  118.  
  119. +++++++++++++++++++++++++++
  120.  
  121. >From mouser@zercom.net (Martin-Gilles Lavoie)
  122. Date: Mon, 13 Nov 1995 08:11:47 -0500
  123. Organization: ZERCOM Technologies Inc.
  124.  
  125. In article <stu6c71-1111952312430001@47.221.33.6>, stu6c71@bnr.ca wrote:
  126.  
  127. > With all the talk these days about Codewarrior and Symantec, it has been 
  128. > hard to find information about alternatives to these two. It will be important
  129. > for me to be able to build 68K OpenDoc parts and containers.
  130. Environments I have
  131. > been considering are:
  132. > QKS Smalltalk Agents 
  133. > LS Object Pascal
  134. > MPW Pro (I'm used to UNIX/DOS programming)
  135. > Digitool Macintosh Common Lisp
  136. > Prograph CPX
  137. > Of secondary importance is the ability to use Quickdraw3D but since I will not
  138. > be developing immediately for PowerMac it is less important. Object Pascal
  139. > seems to be a better object-oriented environment than C++. MPW would
  140. > provide a familiar programming environment, and I don't like the feel of
  141. > the Metrowerks environment. MCL has steep fees for the redistribution kit,
  142. > and Prograph, well I never liked flowcharts to begin with.
  143. > Can anyone provide further information on the suitability of the above for
  144. > 68K OpenDoc development and their programming environment ?
  145.  
  146. I dont think there should be any reason for you to settle for either
  147. Symantec or metrowerks if you're used to Unix-style programming.  MPW will
  148. provide you with greater flexibility on the actual language and compiler
  149. you can use, and the way you build your stuff (no restrictions
  150. whatsoever).  The generated code is also superior in MPW than in anything
  151. else yet.  At least, those are my results and those of other people,
  152. including Apple Engineers.
  153.  
  154. As for those who argue that developping under Symantec and CodeWarrior is
  155. faster, I'm encountering a list of tasks that would argue with those
  156. claims.  Those compilers may be fast at compiling, but for a seasoned MPW
  157. user, MPW can be made *very* fast with just a few simple things (MPW too
  158. can use pre-compiled headers, and we can put our object code anywhere we
  159. want--including a RAM Disk).
  160.  
  161. Martin-Gilles Lavoie
  162. - -------------------------------------------------------------------
  163. No!...try not.  Do, or do not.  There is no try.
  164.     --Yoda on error handling.
  165.  
  166. Wars does not make one great.
  167.     --Yoda on "Great Warrior"
  168.  
  169. +++++++++++++++++++++++++++
  170.  
  171. >From baileyc@beetle.com (Christopher R. Bailey)
  172. Date: Mon, 13 Nov 1995 10:22:18 -0800
  173. Organization: Beetle's Sprawl
  174.  
  175. In article <stu6c71-1111952312430001@47.221.33.6>, stu6c71@bnr.ca wrote:
  176.  
  177. > With all the talk these days about Codewarrior and Symantec, it has been 
  178. > hard to find information about alternatives to these two. It will be important
  179. > for me to be able to build 68K OpenDoc parts and containers.
  180. Environments I have
  181. > been considering are:
  182. > QKS Smalltalk Agents 
  183. > LS Object Pascal
  184. > MPW Pro (I'm used to UNIX/DOS programming)
  185. > Digitool Macintosh Common Lisp
  186. > Prograph CPX
  187. > Of secondary importance is the ability to use Quickdraw3D but since I will not
  188. > be developing immediately for PowerMac it is less important. Object Pascal
  189. > seems to be a better object-oriented environment than C++. MPW would
  190. > provide a familiar programming environment, and I don't like the feel of
  191. > the Metrowerks environment. MCL has steep fees for the redistribution kit,
  192. > and Prograph, well I never liked flowcharts to begin with.
  193. > Can anyone provide further information on the suitability of the above for
  194. > 68K OpenDoc development and their programming environment ?
  195.  
  196. While not directly related to 68K OpenDoc dev, if you are looking at
  197. alternatives, you might also want to check out ParcPlace VisualWorks.  The
  198. advantage would be that it's cross platform, very "full featured", and I
  199. believe they are looking into OpenDoc support.  
  200.  
  201. The biggest problem you'll have is that OpenDoc, as of now, is fairly
  202. entrenched in C++.  Check out comp.soft-sys.middleware.opendoc for more
  203. information.  I'd be interested in what you decide on.
  204.  
  205. _____________ Christopher R. Bailey _____________
  206. baileyc@beetle.com
  207. http://www.quake.net/~baileyc
  208. Macintosh, for those who can see through Windows.
  209. Ride fast, take chances!
  210.  
  211. +++++++++++++++++++++++++++
  212.  
  213. >From ari@shore.net (Ari Halberstadt)
  214. Date: Mon, 13 Nov 1995 19:36:33 -0400
  215. Organization: North Shore Access/Eco Software, Inc; (info@shore.net)
  216.  
  217. In article <mouser-1311950811470001@204.191.6.123>, mouser@zercom.net
  218. (Martin-Gilles Lavoie) wrote:
  219.  
  220. >In article <stu6c71-1111952312430001@47.221.33.6>, stu6c71@bnr.ca wrote:
  221. >
  222. >> With all the talk these days about Codewarrior and Symantec, it has been 
  223. >> hard to find information about alternatives to these two. It will be
  224. important
  225. >> for me to be able to build 68K OpenDoc parts and containers.
  226. >Environments I have
  227. >> been considering are:
  228. >> 
  229. >> QKS Smalltalk Agents 
  230.  
  231. Request a demo CD from them. You will get a lot of very useful
  232. information, they are certainly very responsive in this respect (I
  233. requested info by email on a Friday and had it on Monday!). I looked at
  234. the demo and spoke with them at MacWorld. They have a lot of nice ideas,
  235. but have not implemented many of them yet. For instance, they didn't have
  236. a good GUI builder tool, and OpenDoc support and a native-PowerMac version
  237. were not yet available when I spoke with them. There is also an issue of
  238. using a non-standard environment (they make many extensions to SmallTalk).
  239. It may also buy you cross-platform portability. I think that if they were
  240. to add some major features, it would be a good environment for rapid
  241. development of specific projects when you really don't want to have to
  242. bother with C++.
  243.  
  244. Note: my information is several months old.
  245.  
  246. >> Of secondary importance is the ability to use Quickdraw3D but since I
  247. will not
  248. >> be developing immediately for PowerMac it is less important. Object Pascal
  249. >> seems to be a better object-oriented environment than C++. MPW would
  250. >> provide a familiar programming environment, and I don't like the feel of
  251. >> the Metrowerks environment. MCL has steep fees for the redistribution kit,
  252. >> and Prograph, well I never liked flowcharts to begin with.
  253. >> 
  254. >> Can anyone provide further information on the suitability of the above for
  255. >> 68K OpenDoc development and their programming environment ?
  256.  
  257. You should really consider upgrading to a PowerMac. With CW on a 7100/80,
  258. I get 200K+ lines/minute for C code. This is several times faster than a
  259. 68K computer could provide. The new PowerMac's are really nice too, a lot
  260. cheaper than what I paid just 8 months ago. It is incredible how much time
  261. one can save when the compiler is faster.
  262.  
  263. The nicest things about CW and THINK are their source-level debuggers and
  264. project files. The project files relieve the tedium of make files, but are
  265. a bit hard to get used to coming from a Unix background, as well as being
  266. more limiting (at least in CW, I haven't used Symantec C++ v8) than Make
  267. files. Also, CW make building native-PPC apps easier.
  268.  
  269. The CodeWarrior CFM68K support does not work yet. I was unable to build a
  270. CFM68K application or fragment, while identical code worked for PowerPC.
  271. Metrowerks is working on the problem. For now, MPW is probably your only
  272. bet for 68K OpenDoc development.
  273.  
  274. The old MPW C compiler is really not so hot. For optimized C++ code, you
  275. might want to look at the Motorola compilers. If you get CodeWarrior, you
  276. also get MPW and can use the CW compilers from within MPW, which are a lot
  277. faster than the regular MPW C. Symantec also offers MPW-hosted compilers
  278. which are even distributed with Apple's ETO CD.
  279.  
  280. >I dont think there should be any reason for you to settle for either
  281. >Symantec or metrowerks if you're used to Unix-style programming.  MPW will
  282. >provide you with greater flexibility on the actual language and compiler
  283. >you can use, and the way you build your stuff (no restrictions
  284. >whatsoever).  The generated code is also superior in MPW than in anything
  285. >else yet.  At least, those are my results and those of other people,
  286. >including Apple Engineers.
  287.  
  288. I agree that MPW offers the greatest flexibility. If you need Make files
  289. (you will need them for large projects) and good scriptability, MPW is a
  290. must. The quality of generated code, however, really depends on the
  291. compiler you plug in to MPW:
  292.  
  293. Newsgroups: comp.sys.mac.programmer.misc,comp.sys.mac.programmer.help
  294. From: dowdy@apple.com (Tom Dowdy)
  295. Subject: Re: What does Apple use to develop MacOS?
  296. Sender: news@gallant.apple.com
  297. Date: Wed, 8 Nov 1995 20:45:19 GMT
  298. Organization: Apple Computer, Inc.
  299.  
  300. >As for development environments and compilers, while many
  301. >folks here use Metrowerks projects for daily work and quick
  302. >turnaround, release versions of code are compiled with either
  303. >the 'xlc' compiler on RS/6000s, or with MrC for MPW.  Both of
  304. >these compilers have pretty darn good code optimizers, and it's
  305. >worth the hassle of using them for shipping software.
  306.  
  307. I think it is worth owning MPW, CodeWarrior, and Symantec. For instance,
  308. having THINK C 7 is very handy (even if I do my current programming with
  309. CW) since I can easily use a lot of public code. Having MPW (via
  310. CodeWarrior) is also very handy, since I can do a lot of scripting with
  311. MPW that would be hard to do otherwise. I also am considering upgrading to
  312. the latest Symantec product when it is released next year, as well as
  313. maintaining my CodeWarrior subscription.
  314.  
  315. For commercial development, you should have at least one good C/C++
  316. compiler environment. QKS SmallTalk has the potential to drop a lot of
  317. time from the development of some projects by eliminating much of the
  318. tedium and low-level hackery involved with C++. If QKS SmallTalk provides
  319. some of the features I am waiting for, I think it may be the best non-C++
  320. environment for Mac programming (unless something better comes along).
  321.  
  322. -- Ari Halberstadt (ari@shore.net, ari@world.std.com)
  323. <http://www.shore.net/~ari/> (under construction)
  324. <ftp://ftp.shore.net/members/ari> (use this to get my latest software)
  325.  
  326. +++++++++++++++++++++++++++
  327.  
  328. >From Bob Brown <bob@trapdoor.dstc.edu.au>
  329. Date: 20 Nov 1995 07:53:32 GMT
  330. Organization: DSTC PTY LTD
  331.  
  332. I am a BIG fan of Oberon.
  333.  
  334. There are several implementations available for MANY platforms.
  335.  
  336. Oberon/F is quite notable for its support of compound documents and its planned
  337. migration to Opendoc/OLE.
  338.  
  339. See Guy Laden's list of Oberon related pkg's
  340.  
  341. http://www.math.tau.ac.il/~laden/Ob-pkgs.html
  342.  
  343. -- 
  344. - -------------------------------------------------------------
  345. BOB BROWN                      | Here I am, 'Living The Dream.'
  346. DSTC PTY LTD                   |
  347. Level 7, Gehrmann Laboratories | Trouble is, I don't know WHOSE
  348. The University of Queensland   | dream and what induced it!
  349. Q 4072                         |
  350. Australia                      |
  351. Tel: 61 (7) 3365 4310          |
  352. FAX: +61 (7) 3365 4311         |
  353. bob@dstc.edu.au                |
  354.  
  355.  
  356. ---------------------------
  357.  
  358. >From dlgover@drwho.newera.ab.ca (Donald L. Gover)
  359. Subject: Code Fragment To Identify Disk types
  360. Date: 20 Nov 1995 16:01:09 GMT
  361. Organization: New Era Systems Services
  362.  
  363.   I'm looking for a code fragment that will allow me to determine
  364. what kind of hardware each of the volumes on my MAC are. ie are they
  365. CD, HardDrive, floppy or network? Anyone got such a thing?
  366.  
  367.  
  368.    Thanks Don....
  369.  
  370. +++++++++++++++++++++++++++
  371.  
  372. >From mclow@mailhost2.csusm.edu (Marshall Clow)
  373. Date: Mon, 20 Nov 1995 19:57:35 -0800
  374. Organization: Aladdin Systems
  375.  
  376. In article <48q8o5$fhl@sol.newera.ab.ca>, dlgover@drwho.newera.ab.ca
  377. (Donald L. Gover) wrote:
  378.  
  379. >  I'm looking for a code fragment that will allow me to determine
  380. >what kind of hardware each of the volumes on my MAC are. ie are they
  381. >CD, HardDrive, floppy or network? Anyone got such a thing?
  382. >
  383. >
  384. Nope. :-(
  385.  
  386. Telling if a drive is local or remote is easy; call PBHGetVolParms and
  387. check to see if buffer.vMServerAdr != 0.
  388.  
  389. Telling if a drive is a floppy is trickier. If all you care about is Apple
  390. floppy drives, check to see if the driver name is '.Sony'. Of course, this
  391. will also find old non-SCSI HD20 hard drives, but almost no one uses those
  392. anymore.
  393. For non-Apple floppy drives, it's harder. Check for small, ejectable
  394. volumes, but watch out for ZIP drives, MO drives, etc, and watch out for
  395. partitions on other media.
  396.  
  397. CD's are like floppies. Look for the driver name '.AppleCD'. For non-Apple
  398. drives, again, you have to fall back on heuristics. Large, read-only,
  399. ejectable media is probably a CD, but it may be a write-protected MO.
  400.  
  401. What, exactly, are you trying to accomplish?
  402.  
  403. -- Marshall
  404.  
  405. -- 
  406. Marshall Clow
  407. Aladdin Systems
  408.  
  409. "They that can give up essential liberty to obtain a little temporary
  410.  safety deserve neither liberty nor safety." -- Benjamin Franklin
  411.  _Historical Review of Pennsylvania_, 1759
  412.  
  413. ---------------------------
  414.  
  415. >From D.A.G.Gillies@bradford.ac.uk (Dave the Rave)
  416. Subject: Control Strip Modules
  417. Date: Mon, 20 Nov 1995 10:31:00 GMT
  418. Organization: Unseen University, Ankh-Morpork
  419.  
  420. I've just started playing around with Control Strip Modules. I found
  421. the Tech Note (OS06 I think) on the develop Bookmark CD and very
  422. useful it was too. The only problem I had was that although the utility
  423. routines were documented in their C form, there was no low level interface
  424. information other than that the selector-based trap was 0xAAF2. After
  425. some trial and error and MacsBugging around I deduced that the selector
  426. for the pop-up menu was 0x0408, and that for the get-and-detach-an-icon-
  427. suite call was 0x0506 (or was it 0x0507?) but of course there is no
  428. systematic way to find out the selectors for the others so I can create
  429. my own little interface file along the lines of
  430.  
  431. pascal SBControlStripUtilityRoutine(short param1,long param2,const Rect *param3)
  432.         THREEWORDINLINE{0x303C,0x????,0xAAF2};
  433.  
  434. An update to the Tech notes perhaps, if any Apple people are reading this.
  435. Or is there a (free) SDK I can get hold of?
  436.  
  437.  
  438. Email me please...
  439.  
  440.  
  441. ______________________________________________________
  442. @-|~ (Scientist formerly known as David A. G. Gillies)
  443.                       (email: daggilli@bradford.ac.uk)
  444. You are in a maze of kinky little fetishes,  all alike
  445. (c) 1995 Wittgenstein's Amazing Underwater Supermarket
  446. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  447.  
  448.  
  449. +++++++++++++++++++++++++++
  450.  
  451. >From pottier@trimaran.ens.fr (Francois Pottier)
  452. Date: 21 Nov 1995 13:12:52 GMT
  453. Organization: Ecole Normale Superieure, Paris
  454.  
  455. In article <1995Nov20.103100.8020@bradford.ac.uk>,
  456. Dave the Rave <D.A.G.Gillies@bradford.ac.uk> wrote:
  457.  
  458. >systematic way to find out the selectors for the others so I can create
  459. >my own little interface file along the lines of
  460. >
  461. >pascal SBControlStripUtilityRoutine(short param1,long param2,const Rect *param3)
  462. >       THREEWORDINLINE{0x303C,0x????,0xAAF2};
  463.  
  464. You should look for the file called <ControlStrip.h>. It's now part of
  465. the Universal Headers. I don't know whether it is on the Bookmark CD,
  466. but it comes with CW7.
  467.  
  468. >Or is there a (free) SDK I can get hold of?
  469.  
  470. I suggest you try the recently released Extensions Strip 1.1
  471. Developer's Kit. Extensions Strip is a shareware equivalent to
  472. Control Strip written by Ammon Skidmore. It more friendly to
  473. programmers and it comes with example code. It should be on
  474. Info-Mac in the cfg directory.
  475.  
  476. -- 
  477. Francois
  478. pottier@dmi.ens.fr
  479. http://www.eleves.ens.fr:8080/home/pottier/
  480.  
  481. +++++++++++++++++++++++++++
  482.  
  483. >From blob@apple.com (Brian Bechtel)
  484. Date: 21 Nov 1995 17:34:23 GMT
  485. Organization: Apple Computer, Inc.
  486.  
  487. >An update to the Tech notes perhaps, if any Apple people are reading this.
  488. >Or is there a (free) SDK I can get hold of?
  489.  
  490. I didn't include the information found in ControlStrip.h because the
  491. universal interfaces were changing.  Look at ControlStrip.h in the current
  492. universal interfaces, available at
  493.  <ftp://ftp.info.apple.com//Apple.Support.Area/Developer_Services/
  494.   Tool_Chest/Interfaces/Universal_Interfaces.sit.hqx>
  495.  
  496. -- 
  497. --Brian Bechtel    blob@apple.com    "My opinion, not Apple's"
  498.   Village Idiot, DTS
  499.  
  500. ---------------------------
  501.  
  502. >From Shyguy <shyguy@ecst.csuchico.edu>
  503. Subject: Dave Marks and ints
  504. Date: Mon, 13 Nov 1995 10:06:42 -0800
  505. Organization: California State University, Chico
  506.  
  507. He seems to have a aversion to ints.  In his book on macintosh c++ 
  508. programing he says TWICE not to use ints.  Mind you this is 'int', not 
  509. 'long int' or 'short int'
  510.  
  511. Yet I have never seen any other book say not to use ints!
  512. Why the big fuss about using shorts or longs?  You can just tell the 
  513. compiler to treat ints as 2 bytes or 4 bytes anyways
  514.  
  515. +++++++++++++++++++++++++++
  516.  
  517. >From hunt@metrowerks.com (Eric Hunt)
  518. Date: Mon, 13 Nov 1995 12:53:11 -0600
  519. Organization: metrowerks Corp.
  520.  
  521. In article
  522. <Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu>,
  523. Shyguy <shyguy@ecst.csuchico.edu> wrote:
  524.  
  525. > Why the big fuss about using shorts or longs?  You can just tell the 
  526. > compiler to treat ints as 2 bytes or 4 bytes anyways
  527.  
  528. Portable code cannot ever depend on the size of an int. Shorts and longs
  529. are known to be constant across platforms. If you get in the habit now of
  530. never trusting an int, then you won't get burned in the future.
  531.  
  532. Eric Hunt
  533. Metrowerks Technical Support
  534.  
  535. +++++++++++++++++++++++++++
  536.  
  537. >From plau@wink.io.org (Peter S. Lau)
  538. Date: 13 Nov 1995 19:28:35 GMT
  539. Organization: Internex Online, Toronto, Ontario, Canada (416 363 3783)
  540.  
  541. In article <Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu> Shyguy <shyguy@ecst.csuchico.edu> writes:
  542.  
  543. >He seems to have a aversion to ints.  In his book on macintosh c++ 
  544. >programing he says TWICE not to use ints.  Mind you this is 'int', not 
  545. >'long int' or 'short int'
  546. >
  547. >Yet I have never seen any other book say not to use ints!
  548. >Why the big fuss about using shorts or longs?  You can just tell the 
  549. >compiler to treat ints as 2 bytes or 4 bytes anyways
  550.  
  551. I haven't read the book but I know short is always 2 bytes, where int
  552. could be 2 bytes (default in CW, at least for my copy) or 4 bytes (by
  553. changing the preferences, and long is always 4 bytes (still right?).
  554. I think I would appreciate the always rather than checking/setting the 
  555. preference.
  556.  
  557. Also, most Toolbox calls don't use int's, and I think it's a good
  558. practice to match the types as much as possible.
  559.  
  560. My $0.02.
  561.  
  562. pete
  563.  
  564. +++++++++++++++++++++++++++
  565.  
  566. >From "Andrew C. Plotkin" <erkyrath+@CMU.EDU>
  567. Date: Mon, 13 Nov 1995 16:02:00 -0500
  568. Organization: Carnegie Mellon, Pittsburgh, PA
  569.  
  570. Shyguy <shyguy@ecst.csuchico.edu> writes:
  571. > He seems to have a aversion to ints.  In his book on macintosh c++ 
  572. > programing he says TWICE not to use ints.  Mind you this is 'int', not 
  573. > 'long int' or 'short int'
  574.  
  575. And he's right.
  576.  
  577. > Why the big fuss about using shorts or longs?  You can just tell the 
  578. > compiler to treat ints as 2 bytes or 4 bytes anyways
  579.  
  580. That's exactly the reason. You *can* tell the compiler -- which means
  581. you can also forget, or get it wrong. 
  582.  
  583. It's not that rare that I've had to trash a compiler project file and
  584. start over -- either the project file got corrupted, or I was changing
  585. to a different compiler, or making a PPC project from what had been
  586. a 68K project. At least twice in the past six months I've lost the
  587. setting of int size -- leading to bugs that were, in both cases, hard
  588. to track down. And that's when I was *trying* to avoid using ints.
  589. They keep sneaking in. 
  590.  
  591. I've ported Unix-box code to the Mac, too, and the same problem
  592. arises.
  593.  
  594. To be honest, the int habit has been hard enough to break that I've 
  595. taken to putting 
  596.     if (sizeof(int) != 4) ExitToShell(); 
  597. in my initialization code.
  598.  
  599. --Z
  600.  
  601. "And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
  602.  
  603. +++++++++++++++++++++++++++
  604.  
  605. >From jarrett@pixel.kodak.com (Jim Jarrett)
  606. Date: Mon, 13 Nov 1995 15:31:06 -0500
  607. Organization: Eastman Kodak Co. CD Imaging
  608.  
  609. In article
  610. <Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu>,
  611. Shyguy <shyguy@ecst.csuchico.edu> wrote:
  612.  
  613. > Yet I have never seen any other book say not to use ints!
  614. > Why the big fuss about using shorts or longs?  You can just tell the 
  615. > compiler to treat ints as 2 bytes or 4 bytes anyways
  616.  
  617. And this is EXACTLY why not to use ints. C does not put any definition on
  618. what sizeof(int) should be.  If you try to port code across platforms (or
  619. even across projects), you can have things break in all kinds of
  620. fun-to-debug ways because compiler A had ints as 2 bytes and compiler B
  621. has ints as 4 bytes.
  622.  
  623. short and long ARE defined, however.
  624.  
  625. +------------------------------------------------------------------------+
  626. | Jim Jarrett, CCP                                                       |
  627. | Eastman Kodak CD Imaging                                               |
  628. | 901 Elmgrove Road MC 35400                                             |
  629. | Rochester, NY 14653-5400 (716) 726-6365                                |  
  630. | jarrett@pixel.kodak.com          All opinions expressed are mine alone |
  631. +------------------------------------------------------------------------+
  632.  
  633. +++++++++++++++++++++++++++
  634.  
  635. >From tnleeuw@cs.vu.nl (Leeuw van der TN)
  636. Date: Mon, 13 Nov 1995 21:09:40 GMT
  637. Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
  638.  
  639. Eric Hunt (hunt@metrowerks.com) wrote:
  640. : In article
  641. : <Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu>,
  642. : Shyguy <shyguy@ecst.csuchico.edu> wrote:
  643.  
  644. : > Why the big fuss about using shorts or longs?  You can just tell the 
  645. : > compiler to treat ints as 2 bytes or 4 bytes anyways
  646.  
  647. : Portable code cannot ever depend on the size of an int. Shorts and longs
  648. : are known to be constant across platforms. If you get in the habit now of
  649. : never trusting an int, then you won't get burned in the future.
  650.  
  651. : Eric Hunt
  652. : Metrowerks Technical Support
  653.  
  654.  
  655. And I keep telling that to my friends and they just don't believe it's a
  656. problem :-) Though luck for them.
  657.  
  658. --Tim
  659. -- 
  660. Tim van der Leeuw, student of Computer Science, Vrije Universiteit,
  661. Amsterdam, The Netherlands. Homepage: http://www.cs.vu.nl/~tnleeuw/
  662. Flightsim-Homepages!           http://www.cs.vu.nl/~tnleeuw/hornet/
  663.                                   http://www.cs.vu.nl/~tnleeuw/A10/
  664.  
  665. +++++++++++++++++++++++++++
  666.  
  667. >From awiner@oracle.com (Adam Winer)
  668. Date: Mon, 13 Nov 1995 14:58:35 -0800
  669. Organization: Oracle Corporation
  670.  
  671. In article <jarrett-1311951531060001@jarrett.ycc.kodak.com>,
  672. jarrett@pixel.kodak.com (Jim Jarrett) wrote:
  673.  
  674. > In article
  675. > <Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu>,
  676. > Shyguy <shyguy@ecst.csuchico.edu> wrote:
  677. > > 
  678. > > Yet I have never seen any other book say not to use ints!
  679. > > Why the big fuss about using shorts or longs?  You can just tell the 
  680. > > compiler to treat ints as 2 bytes or 4 bytes anyways
  681. > And this is EXACTLY why not to use ints. C does not put any definition on
  682. > what sizeof(int) should be.  If you try to port code across platforms (or
  683. > even across projects), you can have things break in all kinds of
  684. > fun-to-debug ways because compiler A had ints as 2 bytes and compiler B
  685. > has ints as 4 bytes.
  686. > short and long ARE defined, however.
  687.  
  688. Actually, they aren't, at least not by the ANSI committee.  They
  689. do guarantee that: sizeof(short) <= sizeof(int) <= sizeof(long)
  690.  
  691. If you want to write truly portable code, and you care about
  692. the size of your data types, define types like Apple does:
  693. SInt4, UInt4, etc., and redefine these appropriately on all
  694. platforms you port to.  On the Mac, long is always 4 bytes,
  695. and short is always 2 (so far), but this definitely isn't
  696. true in the world at large.
  697.  
  698. -- Adam Winer
  699. awiner@us.oracle.com
  700.  
  701. +++++++++++++++++++++++++++
  702.  
  703. >From ari@shore.net (Ari Halberstadt)
  704. Date: Mon, 13 Nov 1995 19:03:39 -0400
  705. Organization: North Shore Access/Eco Software, Inc; (info@shore.net)
  706.  
  707. In article <hunt-1311951253110001@k1.metrowerks.com>, hunt@metrowerks.com
  708. (Eric Hunt) wrote:
  709.  
  710. >In article
  711. ><Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu>,
  712. >Shyguy <shyguy@ecst.csuchico.edu> wrote:
  713. >
  714. >> Why the big fuss about using shorts or longs?  You can just tell the 
  715. >> compiler to treat ints as 2 bytes or 4 bytes anyways
  716. >
  717. >Portable code cannot ever depend on the size of an int. Shorts and longs
  718. >are known to be constant across platforms. If you get in the habit now of
  719. >never trusting an int, then you won't get burned in the future.
  720.  
  721. Portable code can depend only on the constraints defined by the ANSI
  722. standard and by specific implementations in <limits.h> and <float.h>. The
  723. sizes of shorts and longs are not constant across platforms. The standard
  724. only requires that type int hold the values -32767..32767, which is a lot
  725. less than what one often wants.
  726.  
  727. All current Mac compilers understand the concept of 2-byte shorts and
  728. 4-byte longs. A lot of fuss is avoided on the mac if you use a short int
  729. where the Mac Toolbox expects a 2-byte signed integral value and a long
  730. int where the Mac Toolbox expects a 4-byte signed integral value. You wont
  731. get bitten by having to fiddle with compiler options or weird libraries
  732. when going between MPW, THINK C, Symantec C++, CodeWarrior, etc. There are
  733. some nasty bugs caused by these things; see Horwich, Josh "Kon & Bal's
  734. Puzzle Page: Printing Pains", Develop 21, March 1995, p117-121.
  735.  
  736. It is worth noting that a lot of programmers (myself included) assumed (or
  737. assume) that, on the mac, short is somehow magically tied to 2-byte values
  738. and long is magically tied to 4-byte values. This is as incorrect as any
  739. of the old assumptions of Unix programmers that int was 4-bytes and
  740. therefore equivalent to a pointer, which has caused nearly endless wasted
  741. hours. It is much more correct  and safer to use typedef's, such as those
  742. finally added by Apple to the Universal Headers, which now include types
  743. like
  744.  
  745. typedef short SInt16;
  746.  
  747. -- Ari Halberstadt (ari@shore.net, ari@world.std.com)
  748. <http://www.shore.net/~ari/> (under construction)
  749. <ftp://ftp.shore.net/members/ari> (use this to get my latest software)
  750.  
  751. +++++++++++++++++++++++++++
  752.  
  753. >From rogers@golddisk.com (Roger Smith)
  754. Date: Tue, 14 Nov 1995 02:47:52 -0500
  755. Organization: Gold Disk
  756.  
  757. Try this one for size:
  758.  
  759. I get a crucial library from a third party developer that's supplied as a
  760. code resource. The interfaces have shorts in the function prototypes. It
  761. turns out the developer used think C (I use CW) for their development.
  762. Because I set my 68K  project for 4 byte ints to maintain compatability
  763. with the power pc version of my app (Not that I have int declarations in
  764. my source, but I have an MPW background where ints are always 4 bytes), I
  765. ran into bus errors calling functions in the 3rd party library . They were
  766. trying to pop the wrong type from  the stack, strangely enough this bug
  767. didn't always crash the machine.I ended up sending them a macsbug log, and
  768. telling them how to fix the problem, but the bug persisted for a few weeks
  769. as it was beyond my [source] control..
  770.  
  771. CW adds a different twist as you can mix the wrong ansi library and
  772. compiler setting.
  773.  
  774. > To be honest, the int habit has been hard enough to break that I've 
  775. > taken to putting 
  776. >     if (sizeof(int) != 4) ExitToShell(); 
  777. > in my initialization code.
  778.  
  779.  
  780. Roger Smith...
  781. Gold Disk Inc.
  782.  
  783. +++++++++++++++++++++++++++
  784.  
  785. >From rdwells@mmm.com (Richard Wells )
  786. Date: 14 Nov 1995 19:46:50 GMT
  787. Organization: 3M Company
  788.  
  789. jarrett@pixel.kodak.com (Jim Jarrett) wrote:
  790. >short and long ARE defined, however.
  791.  
  792. WARNING: Pedantry ahead!!!
  793.  
  794. They are only defined (by the ANSI standard) in the sense that
  795. the following is required:
  796.  
  797. sizeof(short) <= sizeof(int) <= sizeof(long)
  798.  
  799. Also, shorts and ints must handle at least the range -32767..32767,
  800. and longs must handle at least the range -2147483647..2147483647.
  801.  
  802. Of course, any Mac compiler that didn't have 16-bit shorts and
  803. 32-bit longs wouldn't last very long on the market.  But if your
  804. code must be portable to other systems, and you really need to
  805. use integers of given sizes (for use in binary files, for
  806. instance), then I would suggest typedef'ing such types as int16,
  807. int32, uint16, uint32, etc., in some header file that you know
  808. may have to change for each system you port to.
  809.  
  810.  
  811.  
  812. +++++++++++++++++++++++++++
  813.  
  814. >From chris_page@powertalk.claris.com (Chris Page)
  815. Date: Tue, 14 Nov 1995 14:26:52 -0800
  816. Organization: Claris Corporation
  817.  
  818. In article <PLAU.95Nov13142835@wink.io.org>, plau@wink.io.org (Peter S.
  819. Lau) wrote:
  820.  
  821. > I haven't read the book but I know short is always 2 bytes, where int
  822. > could be 2 bytes (default in CW, at least for my copy) or 4 bytes (by
  823. > changing the preferences, and long is always 4 bytes (still right?).
  824. > I think I would appreciate the always rather than checking/setting the 
  825. > preference.
  826.  
  827. Though we should remember that no C types have standard sizes. On 64-bit
  828. processors, some compilers make int 64-bits wide. When you think
  829. "cross-platform", you're really only saying "Metrowerks C, Symantec C, and
  830. MPW". The hard fact of life is that you cannot depend on the size of any
  831. base C types and that if you have dependencies you should put some kind of
  832. checking code or preprocessor conditions into your source to warn you if a
  833. dependency is broken.
  834.  
  835. Of course, for practical purposes, if you're only programming for the Mac,
  836. you can assume short ints are 16-bit and long ints are 32-bit (hmmm...what
  837. happens when you start compiling for PowerPC 620's?).
  838.  
  839. -- 
  840. Chris Page                      | Internet junk mail, advertisements,
  841. Claris Corporation              | and SPAMs are inconsiderate...
  842. chris_page@powertalk.claris.com |            Cut it out! :-P
  843.  
  844. Disclaimer: opinions are not necessarily those of my employer
  845.  
  846. +++++++++++++++++++++++++++
  847.  
  848. >From albtrssp@crocker.com (Kevin Tieskoetter)
  849. Date: 14 Nov 1995 20:07:33 GMT
  850. Organization: Albatross Productions
  851.  
  852. In article <48arna$3rf@dawn.mmm.com>
  853. rdwells@mmm.com (Richard Wells ) writes:
  854.  
  855. > Of course, any Mac compiler that didn't have 16-bit shorts and
  856. > 32-bit longs wouldn't last very long on the market.  But if your
  857.  
  858. Well, MPW has been around for a long time.....
  859.  
  860.  
  861. -kevin
  862.  
  863. //---------------------------------------------------------------------
  864.    Kevin Tieskoetter / Software Prestidigitator, Specular International
  865. //---------------------------------------------------------------------
  866.  
  867. +++++++++++++++++++++++++++
  868.  
  869. >From conor@ozemail.com.au (Conor MacNeill)
  870. Date: Thu, 16 Nov 1995 01:06:43 +1100
  871. Organization: Cognet Pty Limited
  872.  
  873. In article <hunt-1311951253110001@k1.metrowerks.com>, hunt@metrowerks.com
  874. (Eric Hunt) wrote:
  875.  
  876. > In article
  877. > <Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu>,
  878. > Shyguy <shyguy@ecst.csuchico.edu> wrote:
  879. > > Why the big fuss about using shorts or longs?  You can just tell the 
  880. > > compiler to treat ints as 2 bytes or 4 bytes anyways
  881. > Portable code cannot ever depend on the size of an int. Shorts and longs
  882. > are known to be constant across platforms. If you get in the habit now of
  883. > never trusting an int, then you won't get burned in the future.
  884.  
  885. Well "never trusting" doesn't mean "not using". Where ever you plan to use
  886. a short, 
  887. you can safely use an int since an int is always at least as big as a short. 
  888.  
  889. One rationale I have heard put forward is that an int may be more
  890. efficient than a 
  891. short on architectures with a 32 bit word size since shorts may require
  892. extra masking 
  893. and sign extension operations.
  894.  
  895. > Eric Hunt
  896. > Metrowerks Technical Support
  897.  
  898. -- 
  899. - -
  900. Conor MacNeill
  901. conor@ozemail.com.au
  902. Cognet Pty Limited
  903.  
  904. +++++++++++++++++++++++++++
  905.  
  906. >From rdwells@mmm.com (Richard Wells )
  907. Date: 15 Nov 1995 17:48:15 GMT
  908. Organization: 3M Company
  909.  
  910. albtrssp@crocker.com (Kevin Tieskoetter) wrote:
  911. >In article <48arna$3rf@dawn.mmm.com>
  912. >rdwells@mmm.com (Richard Wells ) writes:
  913. >
  914. >> Of course, any Mac compiler that didn't have 16-bit shorts and
  915. >> 32-bit longs wouldn't last very long on the market.  But if your
  916. >
  917. >Well, MPW has been around for a long time.....
  918.  
  919. And it uses 16-bit shorts and 32-bit longs.  What's your point?
  920.  
  921.  
  922.  
  923. +++++++++++++++++++++++++++
  924.  
  925. >From mouser@zercom.net (Martin-Gilles Lavoie)
  926. Date: Wed, 15 Nov 1995 14:11:37 -0500
  927. Organization: ZERCOM Technologies Inc.
  928.  
  929. In article <DI02s5.C47.0.-s@cs.vu.nl>, tnleeuw@cs.vu.nl (Leeuw van der TN)
  930. wrote:
  931.  
  932. > Eric Hunt (hunt@metrowerks.com) wrote:
  933. > : In article
  934. > : <Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu>,
  935. > : Shyguy <shyguy@ecst.csuchico.edu> wrote:
  936. > : > Why the big fuss about using shorts or longs?  You can just tell the 
  937. > : > compiler to treat ints as 2 bytes or 4 bytes anyways
  938. > : Portable code cannot ever depend on the size of an int. Shorts and longs
  939. > : are known to be constant across platforms. If you get in the habit now of
  940. > : never trusting an int, then you won't get burned in the future.
  941. > : Eric Hunt
  942. > : Metrowerks Technical Support
  943. > And I keep telling that to my friends and they just don't believe it's a
  944. > problem :-) Though luck for them.
  945.  
  946. There will come a time when longs will be considered a small data type. 
  947. Such as when we get to 128bit processors.  How will we name 128-bit data
  948. types?
  949. big longs?  I can see this from here:
  950.  
  951.         unsigned big long myFileSize    =   0BL;
  952.  
  953. And the 256-bits model:
  954.  
  955.         unsigned big long long myEventBiggerFileSize =   0BLL;
  956.  
  957. *Sigh*  Whish I've been forced to use UInt8-like types before.
  958.  
  959. Martin-Gilles Lavoie
  960.  
  961. And I'm being very serious at that.  Not.
  962.  
  963. +++++++++++++++++++++++++++
  964.  
  965. >From kellyj@ug1.plk.af.mil (kellyj)
  966. Date: 15 Nov 1995 21:06:22 GMT
  967. Organization: PL/LIDD
  968.  
  969. In article <mouser-1511951411380001@204.191.6.123>
  970. mouser@zercom.net (Martin-Gilles Lavoie) writes:
  971.  
  972. > There will come a time when longs will be considered a small data type. 
  973. > Such as when we get to 128bit processors.  How will we name 128-bit data
  974. > types?
  975.  
  976. We'll just switch over to a Newspeak nomenclature:
  977.  
  978. unsigned double plus plus long x = 0DPPL;
  979.  
  980. This will allow for certain flexibility such as declaring nybble
  981. (4-bit) sized shorts as well:
  982.  
  983. double plus short x = 0DPS;
  984.  
  985. this could be alternatively written:
  986.  
  987. double plus plus un-long x = 0DPPUL;
  988.  
  989. The intent is to eliminate int from our vocabulary, thereby preventing
  990. the human soul from writing Quality Software (I heard that Bill Gates
  991. is pioneering the Newspeak C++ [C double plus] standard ... go figure!)
  992.  
  993. Naturally the use of the keyword "double" presents a certain ambiguity,
  994. especially when referring to extended precision floating point numbers:
  995.  
  996. double plus plus double y = 0.0;
  997.  
  998. You can also declare a double as a long or short double:
  999.  
  1000. long double plus short double pi = 3.145;
  1001.  
  1002. This is left as a challenge to compiler designers and feisty
  1003. programmers everywhere. Of course with such control over the elemental
  1004. types, the need for arrays and structs is eliminated. To keep things
  1005. manageable, they're also introducing the car and cdr operators borrowed
  1006. from LISP to make reading source code easier.
  1007.  
  1008.  
  1009. --joe
  1010. kellyj@ug1.plk.af.mil
  1011. No, I'm deadly serious, so don't flame me!
  1012.  
  1013. +++++++++++++++++++++++++++
  1014.  
  1015. >From malcolm@interval.com (Malcolm Slaney)
  1016. Date: Wed, 15 Nov 1995 07:28:30 -0800
  1017. Organization: Interval Research, Inc.
  1018.  
  1019. In article <hunt-1311951253110001@k1.metrowerks.com>, hunt@metrowerks.com
  1020. (Eric Hunt) wrote:
  1021. > Portable code cannot ever depend on the size of an int. Shorts and longs
  1022. > are known to be constant across platforms.
  1023.  
  1024. No true.... shorts are 48 bits long on a Cray (stored in 64 bits of
  1025. memory) and longs are 64 bits long.  There is going to be more pressure
  1026. for longer ints as microprocessors move to 64 bit words.
  1027.  
  1028. The only guarantee about word size is that
  1029.    sizeof(short) <= sizeof(int) <= sizeof(long)
  1030.  
  1031. -- Malcolm
  1032.  
  1033. +++++++++++++++++++++++++++
  1034.  
  1035. >From ekstrom@aggroup.com (Harold Ekstrom)
  1036. Date: Wed, 15 Nov 1995 10:56:44 -0800
  1037. Organization: the ag group, inc.
  1038.  
  1039. In article <ari-1311951903390001@slip-5-15.shore.net>, ari@shore.net (Ari
  1040. Halberstadt) wrote:
  1041.  
  1042. > [...]
  1043. >It is much more correct  and safer to use typedef's, such as those
  1044. >finally added by Apple to the Universal Headers, which now include types
  1045. >like
  1046. >
  1047. >typedef short SInt16;
  1048.  
  1049. On another note, it'd be nice to also have to these "fixed size" types
  1050. defined for floating point types. We've already got float_t and double_t
  1051. defined for efficiency. How about Float32 and Double64?
  1052.  
  1053. -Harold
  1054.  
  1055. - ------------------------------------------------------------
  1056. Harold Ekstrom
  1057. the ag group, inc.
  1058. <ftp://ftp.aggroup.com/>
  1059. <http://www.aggroup.com/>
  1060.  
  1061. +++++++++++++++++++++++++++
  1062.  
  1063. >From albtrssp@crocker.com (Kevin Tieskoetter)
  1064. Date: 15 Nov 1995 20:40:14 GMT
  1065. Organization: Albatross Productions
  1066.  
  1067. In article <48d94v$hf0@dawn.mmm.com>
  1068. rdwells@mmm.com (Richard Wells ) writes:
  1069.  
  1070. > >> Of course, any Mac compiler that didn't have 16-bit shorts and
  1071. > >> 32-bit longs wouldn't last very long on the market.  But if your
  1072. > >
  1073. > >Well, MPW has been around for a long time.....
  1074. > And it uses 16-bit shorts and 32-bit longs.  What's your point?
  1075.  
  1076. Oops..I misread that...I thought it was saying "16-bit ints"...so much
  1077. for posting without reading thoroughly... :-)
  1078.  
  1079.  
  1080. -kevin
  1081.  
  1082. //---------------------------------------------------------------------
  1083.    Kevin Tieskoetter / Software Prestidigitator, Specular International
  1084. //---------------------------------------------------------------------
  1085.  
  1086. +++++++++++++++++++++++++++
  1087.  
  1088. >From albtrssp@crocker.com (Kevin Tieskoetter)
  1089. Date: 15 Nov 1995 20:41:41 GMT
  1090. Organization: Albatross Productions
  1091.  
  1092. In article <malcolm-1511950728300001@covell-home-3.interval.com>
  1093. malcolm@interval.com (Malcolm Slaney) writes:
  1094.  
  1095. > No true.... shorts are 48 bits long on a Cray (stored in 64 bits of
  1096. > memory) and longs are 64 bits long.  There is going to be more pressure
  1097. > for longer ints as microprocessors move to 64 bit words.
  1098.  
  1099. Especially since the size of a "word" on a PowerPC is 32 bits, and a
  1100. "longword" is 64 bits...so when we say "short" in C, we get a
  1101. half-word, and a "char" is a quarter-word. Potential confusion
  1102. galore....
  1103.  
  1104. -kevin
  1105.  
  1106. //---------------------------------------------------------------------
  1107.    Kevin Tieskoetter / Software Prestidigitator, Specular International
  1108. //---------------------------------------------------------------------
  1109.  
  1110. +++++++++++++++++++++++++++
  1111.  
  1112. >From Mark Williams <Mark@streetly.demon.co.uk>
  1113. Date: Thu, 16 Nov 95 08:56:23 GMT
  1114. Organization: Streetly Software
  1115.  
  1116.  
  1117. In article <jarrett-1311951531060001@jarrett.ycc.kodak.com>, Jim Jarrett writes:
  1118.  
  1119. > In article
  1120. > <Pine.HPP.3.91.951113100257.1392A-100000@guzzler.ecst.csuchico.edu>,
  1121. > Shyguy <shyguy@ecst.csuchico.edu> wrote:
  1122. > > 
  1123. > > Yet I have never seen any other book say not to use ints!
  1124. > > Why the big fuss about using shorts or longs?  You can just tell the 
  1125. > > compiler to treat ints as 2 bytes or 4 bytes anyways
  1126. > And this is EXACTLY why not to use ints. C does not put any definition on
  1127. > what sizeof(int) should be.  If you try to port code across platforms (or
  1128. > even across projects), you can have things break in all kinds of
  1129. > fun-to-debug ways because compiler A had ints as 2 bytes and compiler B
  1130. > has ints as 4 bytes.
  1131. > short and long ARE defined, however.
  1132.  
  1133. No, they are not. There are C compilers for some processors where sizeof(long)=sizeof(char)=1.
  1134.  
  1135. But that asside, the whole point of int is that its supposed to be the most efficient sized integer 
  1136. type at the machine level.
  1137.  
  1138. so eg
  1139.  
  1140. struct {
  1141.         char a[6];
  1142.  } array[1000];
  1143.  
  1144. int x;
  1145. for (x=0;x<1000;x++)
  1146.         do_something_to(&array[x]);
  1147.  
  1148. On 68000 you would hope to have 2 byte ints, so that the multiply is done in hardware, on 68020 and 
  1149. later you dont really care, and on PPC you want 4 byte ints, so that you dont have to keep sign 
  1150. extending x. [I know a decent optimising compiler should be able to cope with _this_ example, but 
  1151. for more complex cases it wouldnt help]
  1152.  
  1153. Specifying either short or long, you would get ineficient code on one or other of the platforms. 
  1154.  
  1155. The only time you want to avoid using ints is in "shared data" situations - eg if your app supports 
  1156. plugins, you need to keep ints out of the interface. If you read and write binary data to files, you 
  1157. need to avoid using ints.
  1158.  
  1159. But I would also recommend avoiding the use of short and long in those situations. Apple has 
  1160. introduced SInt16 , SInt32 etc types in the headers. Use them. Because we could be seeing 64 bit 
  1161. longs quite soon - to take advantage of the 620.
  1162.  
  1163. - --------------------------------------
  1164. Mark Williams<Mark@streetly.demon.co.uk>
  1165.  
  1166. +++++++++++++++++++++++++++
  1167.  
  1168. >From dnebing@news.epix.net (David Nebinger)
  1169. Date: 18 Nov 1995 17:26:16 GMT
  1170. Organization: epix.net
  1171.  
  1172. Shyguy (shyguy@ecst.csuchico.edu) wrote:
  1173. : Yet I have never seen any other book say not to use ints!
  1174. : Why the big fuss about using shorts or longs?  You can just tell the 
  1175. : compiler to treat ints as 2 bytes or 4 bytes anyways
  1176.  
  1177. Just because you can change the compiler's interpretation of an integer
  1178. doesn't mean you can change the toolbox's interpretation of an integer.
  1179.  
  1180. By specifying (by short of long) the type of integer you are using, you
  1181. will know that regardless of what the compiler is doing with ints the
  1182. correctly sized value will be given to the toolbox.
  1183.  
  1184. That is why it is important to avoid ints in Mac code; portability, etc.,
  1185. but they are minor compared to the values required by the toolbox.
  1186.  
  1187. Dave Nebinger
  1188. dnebing@epix.net
  1189.  
  1190.  
  1191. +++++++++++++++++++++++++++
  1192.  
  1193. >From Mark Williams <Mark@streetly.demon.co.uk>
  1194. Date: Sun, 19 Nov 95 08:33:28 GMT
  1195. Organization: Streetly Software
  1196.  
  1197.  
  1198. In article <48l4vo$c08@guava.epix.net>, David Nebinger writes:
  1199.  
  1200. > Shyguy (shyguy@ecst.csuchico.edu) wrote:
  1201. > : Yet I have never seen any other book say not to use ints!
  1202. > : Why the big fuss about using shorts or longs?  You can just tell the 
  1203. > : compiler to treat ints as 2 bytes or 4 bytes anyways
  1204. > Just because you can change the compiler's interpretation of an integer
  1205. > doesn't mean you can change the toolbox's interpretation of an integer.
  1206. > By specifying (by short of long) the type of integer you are using, you
  1207. > will know that regardless of what the compiler is doing with ints the
  1208. > correctly sized value will be given to the toolbox.
  1209. > That is why it is important to avoid ints in Mac code; portability, etc.,
  1210. > but they are minor compared to the values required by the toolbox.
  1211.  
  1212. This is not a problem. If you pass an int by value, it will be converted for you. If you try to pass 
  1213. a pointer to an int to a toolbox routine, it will spit it out.
  1214.  
  1215. - --------------------------------------
  1216. Mark Williams<Mark@streetly.demon.co.uk>
  1217.  
  1218. ---------------------------
  1219.  
  1220. >From bangs@netcom.com (Alex L. Bangs)
  1221. Subject: Drag and Drop ShowDragHilite problem
  1222. Date: Thu, 16 Nov 1995 19:35:49 GMT
  1223. Organization: Earth2, New Pacifica Station
  1224.  
  1225. I have a Drag & Drop problem where I the highlighting doesn't appear
  1226. correctly when I used a non-white background in my window. If my
  1227. background is lighter than RGB values of 62000, then it works fine. If the
  1228. background is darker than that -- say 61500, then the drop points don't
  1229. highlight when I drag over them. If I change it to *outside* hiliting
  1230. (ShowDragHilite with inside=false), then the highlighting shows. The
  1231. window hiliting, which is effectively inside the window, works regardless
  1232. (i.e. when I drag outside of a drop area, then the window highlights
  1233. properly to show it will accept the drop, regardless of how dark the
  1234. background is).
  1235.  
  1236. I would prefer to use inside hiliting since this seems to be more standard
  1237. and looks better for most of my objects.
  1238.  
  1239. The drop areas have a different background color (white), but this doesn't
  1240. appear to be the cause of the problem.
  1241.  
  1242. Any ideas?
  1243.  
  1244. Thanks,
  1245. Alex
  1246.  
  1247. -- 
  1248. Alex L. Bangs
  1249. bangs@netcom.com
  1250.  
  1251. +++++++++++++++++++++++++++
  1252.  
  1253. >From jeremy@dewey.soe.berkeley.edu (Jeremy Roschelle)
  1254. Date: 17 Nov 1995 19:04:40 GMT
  1255. Organization: SimCalc
  1256.  
  1257. In article <bangs-1611951137280001@bangs.slip.netcom.com>,
  1258. bangs@netcom.com (Alex L. Bangs) wrote:
  1259.  
  1260. >I have a Drag & Drop problem where I the highlighting doesn't appear
  1261. >correctly when I used a non-white background in my window. If my
  1262. >background is lighter than RGB values of 62000, then it works fine. If the
  1263.  
  1264. Before calling ShowDragHilite, call:
  1265.  
  1266. ::RGBBackColor(&yourColor);
  1267.  
  1268. HIlite mode reverses pixels that are the same color as the background
  1269. color set in the port.
  1270.  
  1271. Besure to restore the color after your done.
  1272.  
  1273. jeremy
  1274.  
  1275. jeremy              > > > > > > > > > > * Jeremy Roschelle
  1276.                                         * SimCalc Project
  1277.                                         * 4104 24th Street #344
  1278.                                         * San Francisco CA 94114
  1279.                                         * 415 695.2801
  1280.  
  1281. ---------------------------
  1282.  
  1283. >From Rusty Little <rustyl@insync.net>
  1284. Subject: Picture's Bounding Region?
  1285. Date: 21 Nov 1995 17:01:02 GMT
  1286. Organization: Houston, Texas
  1287.  
  1288. Hi,
  1289.  
  1290. I've got a picture that is not rectangular. I would like to know what's
  1291. it's bounding region is on the fly. I haven't found any region info
  1292. within the PicHandle. Does anyone know how you can get the bounding
  1293. region of a non-rectanglular picture on the fly?
  1294.  
  1295. If you know, thanks in advance for your help!!! Responses via e-mail are
  1296. best for me.
  1297.  
  1298. Thanks again,
  1299.  
  1300. Rusty Little
  1301. RustyL@insync.net
  1302.  
  1303. +++++++++++++++++++++++++++
  1304.  
  1305. >From tim@dierks.org (Tim Dierks)
  1306. Date: Tue, 21 Nov 1995 23:24:00 -0800
  1307. Organization: Best Internet Communications
  1308.  
  1309. In article <48t0ke$lee@drencrom.insync.net>, Rusty Little
  1310. <rustyl@insync.net> wrote:
  1311. >I've got a picture that is not rectangular. I would like to know what's
  1312. >it's bounding region is on the fly. I haven't found any region info
  1313. >within the PicHandle. Does anyone know how you can get the bounding
  1314. >region of a non-rectanglular picture on the fly?
  1315.  
  1316. If you do an OpenRgn(), a DrawPicture(), then a CloseRgn() you'll get the
  1317. same effect as if you executed all of the operations in the picture
  1318. individually. Unfortunately, that probably won't be what you want-
  1319. overlapping primitives will have empty spots where they overlap. Instead,
  1320. you should probably replace all the relevant bottleneck procedures in your
  1321. GrafPort with versions which accumulate each boundary into a cumulative
  1322. region. To do this:
  1323.  
  1324.  - Create two new regions, totalRgn and opcodeRgn. The variables should be
  1325. globals.
  1326.  - Draw the picture
  1327.  - Inside of each bottleneck proc:
  1328.    - SetEmptyRgn(opcodeRgn);
  1329.    - OpenRgn();
  1330.    - call the underlying procedure (for example, in the rectProc, you'd
  1331. call StdRect). Change the verb to 'frame'.
  1332.    - CloseRgn(opcodeRgn);
  1333.    - UnionRgn(opcodeRgn,totalRgn,totalRgn);
  1334.  
  1335. Now you'll have the union of all the objects in the region. You'll need to
  1336. call the StdRect primitive for bitmaps. Text will be non-trivial to do
  1337. right. You'll need to do special work for arcs. To do lines correctly,
  1338. construct a region which describes the exterior of a line with the pen
  1339. size in question (it'll be a hexagon for all diagonal lines, a rectangle
  1340. for horizontal or vertical lines).
  1341.  
  1342. Golly, this is harder to do than I thought it'd be when I started. Another
  1343. option, which might be easier, is to image the PICT into an offscreen
  1344. bitmap. Modify the bottlenecks to always paint in black. Then call
  1345. BitMapToRegion() to collect the resulting outline. Benefits are that it
  1346. works with all the opcodes and works correctly with text, etc. You'll have
  1347. to modify the bitsProc to call StdRect, again, unless you want to try to
  1348. create a mask for the bitmaps in the PICT. (I've got some ideas on that,
  1349. too, but I won't go into them here.)
  1350.  
  1351.  - Tim
  1352.  
  1353. -- 
  1354. Tim Dierks - Software Haruspex - tim@dierks.org
  1355. If you can't lick 'em, stick 'em on with a big piece of tape. - Negativland
  1356.  
  1357. ---------------------------
  1358.  
  1359. >From jackson@eyes.uab.edu (Gregory Jackson)
  1360. Subject: Plugins?  How?
  1361. Date: Mon, 13 Nov 1995 05:42:40 -0600
  1362. Organization: UAB
  1363.  
  1364. I am interested in using the power of plugins like Eudora to extend the
  1365. functioning of a program that I am writing.  If my associates use the
  1366. program, I may have to change some of the code to support their setup.  Is
  1367. there an IM or examples on the Net of how to do this?
  1368.  
  1369. Thank you much,
  1370.  
  1371. Greg
  1372.  
  1373. +++++++++++++++++++++++++++
  1374.  
  1375. >From mouser@zercom.net (Martin-Gilles Lavoie)
  1376. Date: Tue, 14 Nov 1995 19:59:39 -0500
  1377. Organization: ZERCOM Technologies Inc.
  1378.  
  1379. In article <jackson-1311950542400001@tty29.maze.ppp.uab.edu>,
  1380. jackson@eyes.uab.edu (Gregory Jackson) wrote:
  1381.  
  1382. > I am interested in using the power of plugins like Eudora to extend the
  1383. > functioning of a program that I am writing.  If my associates use the
  1384. > program, I may have to change some of the code to support their setup.  Is
  1385. > there an IM or examples on the Net of how to do this?
  1386. > Thank you much,
  1387. > Greg
  1388.  
  1389. Checking out the "HyperXCmd.h" header file from any respectable compiler's
  1390. Universal Headers include folder may be a good place to start.
  1391.  
  1392. To my knowlege, HyperCard is the most "plugged-in" app around (next to
  1393. MacOS).  And many applications are actually using HyperCard extensions
  1394. directly.
  1395.  
  1396. (Annecdote; HyperCard is the "brain" behind Montreal-based National Film
  1397. Board of Canada's video library, where each viewing booths are equipped
  1398. with viewing screens and (touch-screen) Macs for complete listing of
  1399. movies produced by NFB (1000+), which sends requests to a Mac-controled
  1400. robotic arm wich loads in your requested video disk in a player assigned
  1401. to your viewing booth.  The whole works is HyperCard, and a few HyperCard
  1402. XFNCs and XCMDs.  It's actually quite hi-tech to see this.)
  1403.  
  1404. >From my own experience with plug-ins though, try not givving your
  1405. extensions developpers direct access to your structures.  Either use
  1406. special routines to access data (accessors), or use alternate structures. 
  1407. This makes it simpler to update your code without breaking the extensions,
  1408. and also tends to keep the extensions developper include files smaller
  1409. (though it works, the Quark XPress extensions files are *HUGE* and ratter
  1410. impractical).
  1411.  
  1412. I have an application with uses custom plug-ins.  Messages are being
  1413. passed to extensions using two OSTypes, one for the event class, the other
  1414. for the actual event.  I use the same constants as those used in
  1415. AppleEvents.  It works ratter nicelly, and makes one thing less to
  1416. remember.
  1417.  
  1418. Martin-Gilles Lavoie
  1419. - -------------------------------------------------------------------
  1420. No!...try not.  Do, or do not.  There is no try.
  1421.     --Yoda on error handling.
  1422.  
  1423. Wars does not make one great.
  1424.     --Yoda on "Great Warrior"
  1425.  
  1426. +++++++++++++++++++++++++++
  1427.  
  1428. >From kirtap@kagi.com (Patrik Johansson)
  1429. Date: Wed, 15 Nov 1995 19:45:19 +0100
  1430. Organization: KTH
  1431.  
  1432. > I have an application with uses custom plug-ins.  Messages are being
  1433. > passed to extensions using two OSTypes, one for the event class, the other
  1434. > for the actual event.  I use the same constants as those used in
  1435. > AppleEvents.  It works ratter nicelly, and makes one thing less to
  1436. > remember.
  1437.  
  1438. Just curios, can you tell us more about how you communicate with your
  1439. plug-ins? Do you have real two way communication or do you just send data
  1440. to it from the main application? How are your plug-ins stored? As CODE
  1441. resources? How do you load them so you can communicate with it?
  1442.  
  1443. Pj
  1444.  
  1445. +++++++++++++++++++++++++++
  1446.  
  1447. >From janwillem@idsys.nl (J.W. Luiten)
  1448. Date: 16 Nov 1995 08:20:56 GMT
  1449. Organization: ID Systems/TI
  1450.  
  1451. In article <jackson-1311950542400001@tty29.maze.ppp.uab.edu>,
  1452. jackson@eyes.uab.edu (Gregory Jackson) wrote:
  1453.  
  1454. > I am interested in using the power of plugins like Eudora to extend the
  1455. > functioning of a program that I am writing.  If my associates use the
  1456. > program, I may have to change some of the code to support their setup.  Is
  1457. > there an IM or examples on the Net of how to do this?
  1458. > Thank you much,
  1459. > Greg
  1460.  
  1461. Have a look at the Code Fragment Manager. All functionality needed is in there.
  1462. MacTech (www.mactech.com) has an excellent example of how to use it. The
  1463. example is in volume 10 and is called "Powering Up".
  1464.  
  1465.  
  1466. Kind regards,
  1467.  
  1468. J.W. Luiten.
  1469.  
  1470. +++++++++++++++++++++++++++
  1471.  
  1472. >From avirr@metrowerks.com (Avi Rappoport)
  1473. Date: Fri, 17 Nov 1995 10:55:39 -0800
  1474. Organization: Metrowerks Corporation
  1475.  
  1476. In article <jackson-1311950542400001@tty29.maze.ppp.uab.edu>,
  1477. jackson@eyes.uab.edu (Gregory Jackson) wrote:
  1478.  
  1479. ) I am interested in using the power of plugins like Eudora to extend the
  1480. ) functioning of a program that I am writing.  If my associates use the
  1481. ) program, I may have to change some of the code to support their setup.  Is
  1482. ) there an IM or examples on the Net of how to do this?
  1483. The new book "A Fragment of Your Imagination" by Joe Zobkiw, covers
  1484. componants and code resources as well as code fragments.  It's got
  1485. examples of Photoshop filters and such.  From Addison-Wesley, ISBN
  1486. 0-201-48358-0.
  1487.  
  1488. -- 
  1489. Avi Rappoport                                  avirr@metrowerks.com
  1490. User Advocate and Publications Coordinator
  1491. Metrowerks Corporation
  1492.  
  1493. ---------------------------
  1494.  
  1495. >From kbs3387@silver.sdsmt.edu (Kevin Stone)
  1496. Subject: Programing For Joysticks?
  1497. Date: 16 Nov 1995 21:21:32 GMT
  1498. Organization: South Dakota School of Mines and Technology
  1499.    Can anyone tell me where I can get all the nessesary information to 
  1500. program for all the popular joysticks and game-pads.  I suppose could just 
  1501. write to the companies that make them... but I don't know where I can get 
  1502. their e-mail addresses.
  1503.    Any info would be helpful. :)
  1504.  
  1505. Thanks.
  1506. Sincerly,
  1507.   Brian Stone
  1508.   bas2631@silver.sdsmt.edu
  1509.   Respond To: kbs3387@silver.sdsmt.edu
  1510.  
  1511.  
  1512. +++++++++++++++++++++++++++
  1513.  
  1514. >From thebug@berlin.snafu.de (TheBug)
  1515. Date: Sun, 19 Nov 1995 18:10:42 +0100
  1516. Organization: privat
  1517.  
  1518. In article <48ga0s$p94@news.sdsmt.edu>, kbs3387@silver.sdsmt.edu (Kevin
  1519. Stone) wrote:
  1520.  
  1521. >    Can anyone tell me where I can get all the nessesary information to 
  1522. > program for all the popular joysticks and game-pads.  I suppose could just 
  1523. > write to the companies that make them... but I don't know where I can get 
  1524. > their e-mail addresses.
  1525. >    Any info would be helpful. :)
  1526.  
  1527. If you need info for the CH Products stuff, contact me. CH and Fesh! have
  1528. recently released an API that allows you to use game controllers without
  1529. specifically programming for any of them. JoyManager delivers information
  1530. about the capabilities of the available devices.
  1531.  
  1532. -- 
  1533. *******************************************************************
  1534. Guido Körber -            Programmer and hardware hacker 
  1535. thebug@berlin.snafu.de    Specialised in mistreating the ADB
  1536. fax: x49-30-773 81 36     Ask me about:
  1537.                            Flightstick Pro, Jetstick
  1538.                            MacEnjoy, MacEnjoy Style
  1539.  
  1540. Opinions expressed herein are mine unless expressly stated 
  1541. otherwise. Similarities with living or undead persons are
  1542. coincidence and not intended - really!   ;-)
  1543. Best use before: (see date printed on backside of message)
  1544. *******************************************************************
  1545.  
  1546. +++++++++++++++++++++++++++
  1547.  
  1548. >From ajbarry@ozemail.com.au (Andrew Barry)
  1549. Date: Tue, 21 Nov 1995 22:39:30 +1000
  1550. Organization: OzEmail Pty Ltd - Australia
  1551.  
  1552. In article <48ga0s$p94@news.sdsmt.edu>, kbs3387@silver.sdsmt.edu (Kevin
  1553. Stone) wrote:
  1554.  
  1555. >    Can anyone tell me where I can get all the nessesary information to 
  1556. > program for all the popular joysticks and game-pads.  I suppose could just 
  1557. > write to the companies that make them... but I don't know where I can get 
  1558. > their e-mail addresses.
  1559. >    Any info would be helpful. :)
  1560.  
  1561. You can contact Guido Koerber of Fesh! who is distributing a joystick API
  1562. for joysticks that are made by Fesh! and CH.
  1563.  
  1564. The address I have is:
  1565. FESH@AppleLink.Apple.COM
  1566.  
  1567. The key phrase is "JoyManager SDK".
  1568.  
  1569. I hope this helps.
  1570.  
  1571. Andrew Barry
  1572.  
  1573. +++++++++++++++++++++++++++
  1574.  
  1575. >From thebug@berlin.snafu.de (TheBug)
  1576. Date: Tue, 21 Nov 1995 17:22:44 +0100
  1577. Organization: privat
  1578.  
  1579. In article <ajbarry-2111952239300001@slcan1p28.ozemail.com.au>,
  1580. ajbarry@ozemail.com.au (Andrew Barry) wrote:
  1581.  
  1582. > You can contact Guido Koerber of Fesh! who is distributing a joystick API
  1583. > for joysticks that are made by Fesh! and CH.
  1584. > The address I have is:
  1585. > FESH@AppleLink.Apple.COM
  1586.  
  1587. Actually I prefer if you address me at: thebug@berlin.snafu.de
  1588. I will send SDKs to all interested people (about 400k though...).
  1589.  
  1590. We have just opened a ListServ to discuss the future directions of
  1591. JoyManager, contact me if you are interested.
  1592.  
  1593. -- 
  1594. *******************************************************************
  1595. Guido Körber -            Programmer and hardware hacker 
  1596. thebug@berlin.snafu.de    Specialised in mistreating the ADB
  1597. fax: x49-30-773 81 36     Ask me about:
  1598.                            Flightstick Pro, Jetstick
  1599.                            MacEnjoy, MacEnjoy Style
  1600.  
  1601. Opinions expressed herein are mine unless expressly stated 
  1602. otherwise. Similarities with living or undead persons are
  1603. coincidence and not intended - really!   ;-)
  1604. Best use before: (see date printed on backside of message)
  1605. *******************************************************************
  1606.  
  1607. ---------------------------
  1608.  
  1609. >From hayes@ug.cs.dal.ca (Kevin Hayes)
  1610. Subject: Registering File Creators and Types
  1611. Date: Thu, 16 Nov 95 16:01:10 GMT
  1612. Organization: Dalhousie University
  1613.  
  1614. Hi all,
  1615.  
  1616. If this is in an FAQ, please post a location. I'm trying to register a file 
  1617. type and creator code for my new shareware game. Does anyone know how I should 
  1618. go about doing this? I've checked Apple's Web sites but couldn't find any 
  1619. info. (They're in the middle of reorganizing everything, it's hard to get 
  1620. around these days)
  1621.  
  1622. Thanks,
  1623. Kevin.
  1624.  
  1625.  
  1626. +++++++++++++++++++++++++++
  1627.  
  1628. >From tulip@tiac.net (Ed Anson)
  1629. Date: Fri, 17 Nov 1995 00:40:35 -0500
  1630. Organization: Tulip Software
  1631.  
  1632. In article <1995Nov16.120110.43289@ac.dal.ca>, hayes@ug.cs.dal.ca (Kevin
  1633. Hayes) wrote:
  1634.  
  1635. > Hi all,
  1636. > If this is in an FAQ, please post a location. I'm trying to register a file 
  1637. > type and creator code for my new shareware game. Does anyone know how I
  1638. should 
  1639. > go about doing this? I've checked Apple's Web sites but couldn't find any 
  1640. > info. (They're in the middle of reorganizing everything, it's hard to get 
  1641. > around these days)
  1642.  
  1643. Apple recently announced a new web page that includes a registration form
  1644. as well as a database of codes that are in use. I just visited it earlier
  1645. today, and it is a great step in the right direction.
  1646.  
  1647. I can't remember the URL, and it's on the Mac at my other office. If you
  1648. still can't find it, just send me e-mail at <mailto:eanson@xis.xerox.com>
  1649. and I'll look it up for you.
  1650.  
  1651. - --------------------
  1652. Ed Anson
  1653. Tulip Software
  1654. Andover, MA 01810   Check out my WWW page:
  1655. U.S.A.              <http://www.tiac.net/users/tulip/home.html>
  1656.  
  1657. +++++++++++++++++++++++++++
  1658.  
  1659. >From jwbaxter@olympus.net (John W. Baxter)
  1660. Date: Thu, 16 Nov 1995 22:37:31 -0800
  1661. Organization: Townsend Communications
  1662.  
  1663. In article <1995Nov16.120110.43289@ac.dal.ca>, hayes@ug.cs.dal.ca (Kevin
  1664. Hayes) wrote:
  1665.  
  1666. > Hi all,
  1667. > If this is in an FAQ, please post a location. I'm trying to register a file 
  1668. > type and creator code for my new shareware game. Does anyone know how I
  1669. should 
  1670. > go about doing this? I've checked Apple's Web sites but couldn't find any 
  1671. > info. (They're in the middle of reorganizing everything, it's hard to get 
  1672. > around these days)
  1673.  
  1674. It is an FAQ (I don't know where the answer is), but the answer has
  1675. changed within the last few days.
  1676.  
  1677. On Apple's Web servers (somewhere) is a form you can fill out using a
  1678. browser to do your registration.  The old ways still work (paper form to
  1679. Apple, suitable email to Apple).
  1680.  
  1681.    --John
  1682.  
  1683. -- 
  1684.   "This item is not available because it cannot be removed."
  1685. John W. Baxter    Port Ludlow, WA     jwbaxter@olympus.net
  1686.  
  1687. +++++++++++++++++++++++++++
  1688.  
  1689. >From Dave Overton <doverton@iglou.com>
  1690. Date: Fri, 17 Nov 1995 14:17:40 GMT
  1691. Organization: DataStream Imaging Systems, Inc.
  1692.  
  1693. Kevin,
  1694. Oddly enough, Apple DTS just sent this around.
  1695. Dave Overton
  1696.  
  1697.  
  1698.  
  1699. Item    3960360                         9-Nov-95        16:31PST
  1700.  
  1701. From:   DEV.NEWS                        News for Apple Developers,ESI
  1702.  
  1703. To:     PAS19$                          Apple Associates
  1704.         PAS20$                          Apple Associates
  1705.  
  1706. - ---------------------------------------------------------------------
  1707. - ----
  1708.  
  1709. Sub:    WWW Reg of Creator/File Types
  1710.  
  1711. Dear Developers,
  1712.  
  1713. Apple has recently made changes to improve and simplify the process of
  1714. registering creator and file type codes with Apple.  We have placed the
  1715. registration system on the World Wide Web, and we have also published a
  1716. database
  1717. of creator/file types already assigned to developers.  Both of these
  1718. changes
  1719. have been in response to developer requests.
  1720.  
  1721. The new creator/file type registration system is now available at the
  1722. following
  1723. URL:http://dev.info.apple.com/cftype/main.html.  We will continue to use
  1724. the
  1725. old HyperCard stack because all developers do not have access to the Web.
  1726. We
  1727. encourage those developers who do have access to the web to register their
  1728. application information using the above URL. On this web site you can do
  1729. the
  1730. following:
  1731.     - Register creator and/or file type codes with Apple
  1732.     - Search the Apple creator code database
  1733.     - Get answers to common questions regarding registration
  1734.  
  1735. We've also created a searchable database on the World Wide Web.
  1736. Developers can
  1737. search up to 16 codes at a time to see if they have been assigned by
  1738. Apple.
  1739. Owner Information related to the codes, such as company, contact, address,
  1740. phone, etc., cannot be published because that developer information is
  1741. confidential.
  1742.  
  1743. Your feedback is important to us! If you have any questions or comments
  1744. please
  1745. send them to Apple Developer Support at the electronic email address
  1746. "devfeedback@applelink.apple.com".  Below you'll find a Q&A that may
  1747. answer
  1748. some of your questions.
  1749.  
  1750. Sincerely,
  1751.  
  1752. Apple Developer Support
  1753.  
  1754. =============================================================
  1755. Q&A Section
  1756. =============================================================
  1757. Q: How does the WWW creator/file type registration page improve the
  1758. registration process for developers?
  1759. A:  The on-line registration system improves the registration process in
  1760. several ways.
  1761.     - an up-to-date searchable database
  1762.     - convenient registration for developers with Web access
  1763.     - faster turn-around time in processing registration requests
  1764.     - better data validation (registrations not accepted until data
  1765. entered
  1766. correctly)
  1767.     - ability to search the database for creator codes (application
  1768. signatures)
  1769.     - on-line documentation to assist with common registration questions
  1770.     - immediate feedback (if a code is taken, you'll find out online)
  1771.     - no need to have HyperCard installed
  1772.     - accessible via any forms-capable browser (NetScape, Mosaic, MacWeb,
  1773. eWorld, AOL, etc.)
  1774.  
  1775. Q: Why do I need to register the creator or file type for my application?
  1776. A: Registering your application creator code with Apple ensures that it is
  1777. unique. The Macintosh OS requires unique creator codes so that it can
  1778. correctly
  1779. identify applications and documents.
  1780.  
  1781. Q: Creator codes need to be registered with Apple to ensure that they are
  1782. unique, but why do file types need to be registered with Apple if they do
  1783. not
  1784. need to be unique?
  1785. A: You only need to register your creator codes with Apple. File type
  1786. registrations are optional, and Apple may discontinue registering them in
  1787. the
  1788. future.
  1789.  
  1790. Q: Are there any creator or file type codes developers can't use?
  1791. A: Creator codes and files types consisting entirely of all lower case
  1792. characters (a-z) are reserved for use by Apple.
  1793.  
  1794. Q: Where can a developer get more information on creator and file types?
  1795. A: Please see Inside Macintosh:Macintosh Toolbox Essentials, chapter 7,
  1796. "The
  1797. Finder Interface" (ISBN 0-201-63243-8). Macintosh Technical Note #36 also
  1798. is
  1799. helpful. And of course, we are available to help answer questions at
  1800. Apple's
  1801. Developer Support Center (electronic mail:
  1802. devsupport@applelink.apple.com).
  1803.  
  1804. Q: When should I register my creator/file type codes with Apple?
  1805. A: You should register your codes with Apple as early as possible. Many
  1806. developers wait until the application is done and ready to go to
  1807. manufacturing
  1808. only to find out the code they have selected is in use.
  1809.  
  1810. Q: Do icons, fonts, or resource types need to be registered with Apple?
  1811. A: No. Apple no longer registers either icons, fonts, or resource types.
  1812.  
  1813. Q: What do I do if the creator code I am requesting has already been
  1814. assigned?
  1815. A: You will need to request an alternate code. By using the Web
  1816. registration
  1817. form, you will find out immediately if the code you are requesting has
  1818. already
  1819. been assigned.
  1820.  
  1821. Q: How will I know my registration has been processed after I have
  1822. submitted it
  1823. using the registration form on the Web?
  1824. A: After your registration is submitted using the Web registration form a
  1825. confirmation will be sent out via electronic mail within 2-3 business
  1826. days. If
  1827. you do not receive a confirmation within 2-3 business days, you should
  1828. send an
  1829. electronic mail message to devsupport@applelink.apple.com requesting the
  1830. status
  1831. of your registration. In the mail message, please include the following
  1832. information about yourself:
  1833.     Name:
  1834.     Company:
  1835.     Mail Address:
  1836.     Phone Number:
  1837.     Date you submitted your registration:
  1838.  
  1839. Please note that most registrations are processed within 48 hours.  It is
  1840. very
  1841. important that you supply a postal mail address and phone number when
  1842. submitting any question to devsupport@applelink.apple.com. If an
  1843. electronic
  1844. mail message is sent to the address indicated by you, and the address is
  1845. incorrect or undeliverable, we do not have any alternate way to contact
  1846. you.
  1847.  
  1848. Q: Must a developer be a member of Apple's Developer programs to register
  1849. their
  1850. creator or file type information?
  1851. A: You do not need to be a member of Apple's Developer programs to use
  1852. this
  1853. service.
  1854.  
  1855. Q: Can I get a list of all the codes maintained by Apple?
  1856. A: The only information Apple can give out from the creator/file type
  1857. database
  1858. is the list of creator codes. These codes are now available and
  1859. searchable on
  1860. Apple's creator/file type registration page on the Web. The URL of the
  1861. search
  1862. form is:
  1863. http://dev.info.apple.com/cftype/find.html
  1864. We cannot give out any other information in the database. Information
  1865. such as
  1866. company name, contact, address, and phone number is confidential.
  1867.  
  1868. Q: Why can't I use the Creator/File type registration stack that is
  1869. distributed
  1870. by Apple?
  1871. A: You can continue to use the registration stack that Apple distributes
  1872. via
  1873. CD, the internet, and on-line services.  Your registration will be
  1874. processed
  1875. more efficiently if you use the Web registration form. If you do not have
  1876. access to Apple's Web registration form then you should use the HyperCard
  1877. registration stack. Please note the HyperCard registration stack contains
  1878. an
  1879. internal database of creator codes that have already been assigned by
  1880. Apple.
  1881. The creator codes contained in the HyperCard stack are at least 1-2
  1882. months old.
  1883. When using the stack to register a new code, a check is made against the
  1884. internal database, but the database in the stack is at least 1-2 months
  1885. old. If
  1886. you are using an older version of the stack (which is very common), then
  1887. the
  1888. internal database of assigned codes is even older.
  1889.  
  1890. Q: The current HyperCard registration stack says I should send my
  1891. registration
  1892. to "devsupport@apple.com", but I've been told the correct address is
  1893. "devsupport@applelink.apple.com".
  1894. A: You can send the registration to either  "devsupport@apple.com" or
  1895. "devsupport@applelink.apple.com". Normal developer questions should still
  1896. be
  1897. sent to "devsupport@applelink.apple.com".
  1898.  
  1899. +++++++++++++++++++++++++++
  1900.  
  1901. >From tulip@tiac.net (Ed Anson)
  1902. Date: Fri, 17 Nov 1995 20:50:40 -0500
  1903. Organization: Tulip Software
  1904.  
  1905. In article <tulip-1711950040350001@tulip.tiac.net>, tulip@tiac.net (that's
  1906. me) wrote:
  1907.  
  1908. > Apple recently announced a new web page that includes a registration form
  1909. > as well as a database of codes that are in use. I just visited it earlier
  1910. > today, and it is a great step in the right direction.
  1911. > I can't remember the URL, and it's on the Mac at my other office. If you
  1912. > still can't find it, just send me e-mail at <mailto:eanson@xis.xerox.com>
  1913. > and I'll look it up for you.
  1914.  
  1915. That was yesterday. Today, I found the URL again. Since there appears to
  1916. be some interest, I'll post it here:
  1917.  
  1918.    <http://dev.info.apple.com/cftype/main.html>
  1919.  
  1920. It sure beats the old method of using HyperCard stacks and AppleLink.
  1921.  
  1922. - --------------------
  1923. Ed Anson
  1924. Tulip Software
  1925. Andover, MA 01810   Check out my WWW page:
  1926. U.S.A.              <http://www.tiac.net/users/tulip/home.html>
  1927.  
  1928. +++++++++++++++++++++++++++
  1929.  
  1930. >From jklecker@pobox.com (Joel Klecker)
  1931. Date: Sun, 19 Nov 1995 11:43:45 -0800
  1932. Organization: The House of Beavis
  1933.  
  1934. In article <1995Nov16.120110.43289@ac.dal.ca>, hayes@ug.cs.dal.ca (Kevin
  1935. Hayes) wrote:
  1936.  
  1937. #If this is in an FAQ, please post a location. I'm trying to register a file 
  1938. #type and creator code for my new shareware game. Does anyone know how I should 
  1939. #go about doing this? I've checked Apple's Web sites but couldn't find any 
  1940.  
  1941. <URL:http://dev.info.apple.com/cftype/main.html>
  1942.  
  1943. -- 
  1944. Joel Klecker
  1945. jklecker@pobox.com
  1946. http://www.teleport.com/~jklecker/
  1947. Netscape: The Microsoft of the Internet
  1948.  
  1949. +++++++++++++++++++++++++++
  1950.  
  1951. >From jeremy@dewey.soe.berkeley.edu (Jeremy Roschelle)
  1952. Date: 19 Nov 1995 17:35:29 GMT
  1953. Organization: SimCalc
  1954.  
  1955. In article <1995Nov16.120110.43289@ac.dal.ca>, hayes@ug.cs.dal.ca (Kevin
  1956. Hayes) wrote:
  1957.  
  1958. >Hi all,
  1959. >
  1960. >If this is in an FAQ, please post a location. I'm trying to register a file 
  1961. >type and creator code for my new shareware game. Does anyone know how I should 
  1962. >go about doing this? I've checked Apple's Web sites but couldn't find any.
  1963.  
  1964. If you have a developer CD, there is a stack on it for registration. If
  1965. not send e-mail to
  1966.  
  1967. devsupport@apple.com
  1968.  
  1969. jeremy
  1970.  
  1971. jeremy              > > > > > > > > > > * Jeremy Roschelle
  1972.                                         * SimCalc Project
  1973.                                         * 4104 24th Street #344
  1974.                                         * San Francisco CA 94114
  1975.                                         * 415 695.2801
  1976.  
  1977. +++++++++++++++++++++++++++
  1978.  
  1979. >From alain@cs.uchicago.edu (Alain Roy)
  1980. Date: Mon, 20 Nov 1995 15:43:00 GMT
  1981. Organization: It lurks in the night
  1982.  
  1983. In article <jeremy-1911950938310001@sfsp78.slip.net>,
  1984. jeremy@dewey.soe.berkeley.edu (Jeremy Roschelle) wrote:
  1985.  
  1986. >In article <1995Nov16.120110.43289@ac.dal.ca>, hayes@ug.cs.dal.ca (Kevin
  1987. >Hayes) wrote:
  1988. >
  1989. >>Hi all,
  1990. >>
  1991. >>If this is in an FAQ, please post a location. I'm trying to register a file 
  1992. >>type and creator code for my new shareware game. Does anyone know how I
  1993. should 
  1994. >>go about doing this? I've checked Apple's Web sites but couldn't find any.
  1995. >
  1996. >If you have a developer CD, there is a stack on it for registration. If
  1997. >not send e-mail to
  1998. >
  1999. >devsupport@apple.com
  2000.  
  2001. I'd suggest checking out:
  2002.  
  2003. http://dev.info.apple.com/cftype/main.html
  2004.  
  2005. -alain
  2006.  
  2007. ---------------------------
  2008.  
  2009. >From lars.farm@nts.mh.se (Lars Farm)
  2010. Subject: ResourceHandle?
  2011. Date: Wed, 15 Nov 1995 11:15:14 +0100
  2012. Organization: pv
  2013.  
  2014. Is there a reliable and documented way to determine if a Handle refers to a
  2015. resource or not? HGetState works only for non purged handles. HomeResFile
  2016. seems to work on purged handles, but I can't find anything in IM to support
  2017. this observation. Any other safe and documented way?
  2018.  
  2019.  
  2020. --
  2021. Lars Farm, lars.farm@nts.mh.se
  2022.  
  2023. +++++++++++++++++++++++++++
  2024.  
  2025. >From virtuoso@internexus.net (Roger D. Placer)
  2026. Date: Thu, 16 Nov 1995 09:11:50 -0500
  2027. Organization: Virtuoso Software Consulting
  2028.  
  2029. In article <ACCF7C4296689451@sleipner.nts.mh.se>, lars.farm@nts.mh.se
  2030. (Lars Farm) wrote:
  2031.  
  2032. * Is there a reliable and documented way to determine if a Handle refers to a
  2033. * resource or not? HGetState works only for non purged handles. HomeResFile
  2034. * seems to work on purged handles, but I can't find anything in IM to support
  2035. * this observation. Any other safe and documented way?
  2036.  
  2037. Here's an easy way:
  2038.  
  2039. Boolean IsResHandle(Handle myHndl)
  2040.    {
  2041.    return (HomeResFile(myHndl) != -1);
  2042.    }
  2043.  
  2044.  
  2045. Roger
  2046.  
  2047. ================================|=====================================
  2048. Sr. SW Engineer, BestWare Inc.     Pres., Virtuoso Software Consulting
  2049.   Rockaway, NJ                                           Oakland, NJ
  2050.     roger_placer@bestprog.com              virtuoso@internexus.net
  2051. ==== Makers of M.Y.O.B. ========|==== Custom Macintosh Solutions =====
  2052.  
  2053. +++++++++++++++++++++++++++
  2054.  
  2055. >From mclow@mailhost2.csusm.edu (Marshall Clow)
  2056. Date: Sat, 18 Nov 1995 20:31:00 -0800
  2057. Organization: Aladdin Systems
  2058.  
  2059. In article <ACCF7C4296689451@sleipner.nts.mh.se>, lars.farm@nts.mh.se
  2060. (Lars Farm) wrote:
  2061.  
  2062. >Is there a reliable and documented way to determine if a Handle refers to a
  2063. >resource or not? HGetState works only for non purged handles. HomeResFile
  2064. >seems to work on purged handles, but I can't find anything in IM to support
  2065. >this observation. Any other safe and documented way?
  2066. >
  2067. Congratulations on a good description of the problem.
  2068.  
  2069. Here's my answer:
  2070.    Use HomeResFile. The documentation for HRF says nothing about whether
  2071. or not the handle is purged, while the docs for HGetState specifically
  2072. state that HGetState does not work for purged handles.
  2073.  
  2074. Consider the following code fragment:
  2075.  
  2076.    SetResLoad ( false );
  2077.    h = GetResource ( 'xxxx', yyy );
  2078.    SetResLoad ( true );
  2079.    if ( h == nil )  // Get a good error, because the Resource mgr lies!
  2080.       err = ResError () != noErr ? ResError () : resNotFound;
  2081.    else {
  2082.       fRefNum = HomeResFile ( h );
  2083.       if ( fRefNum == 2 ) { // System file
  2084.          LoadResource ( h );
  2085.          if (( err == ResError ()) == noErr ) {
  2086.             .....
  2087.             }
  2088.          }
  2089.       }
  2090.  
  2091. and so on.
  2092.  
  2093. Calling GetResource with ResLoad set to false is perfectly legal.
  2094. It's a valid resource handle. (empty, but valid) You can call
  2095. LoadResource, DetachResource, HomeResFile, ReleaseResource, etc on it.
  2096.  
  2097. -- Marshall
  2098.  
  2099. -- 
  2100. Marshall Clow
  2101. Aladdin Systems
  2102.  
  2103. "They that can give up essential liberty to obtain a little temporary
  2104.  safety deserve neither liberty nor safety." -- Benjamin Franklin
  2105.  _Historical Review of Pennsylvania_, 1759
  2106.  
  2107. ---------------------------
  2108.  
  2109. >From scipioni@nai.net (Steve Scipioni)
  2110. Subject: Text is text is text...isn't it?
  2111. Date: Mon, 20 Nov 1995 12:31:09 -0400
  2112. Organization: NAI
  2113.  
  2114. What is the difference between UNIX, DOS, and Mac text format?  I thought
  2115. that ASCII was ASCII.  I'm writing this is BBEdit, and will save it as Mac
  2116. format, which is how I have the program set up as default.  I'll then open
  2117. it in Newswatcher, and send it off to this newsgroup. I also use BBEdit to
  2118. write HTML documents, and my HTML seems to load just fine once it's on the
  2119. server (a UNIX system).  
  2120.  
  2121. I have come to understand that the primary difference between the way the
  2122. three OS's handle text is by way of "end of line conventions."  Just how
  2123. does a line feed differ from a carriage return?  And is it true that the
  2124. Mac uses both?  How is text rendered on other systems when it encounters a
  2125. file that was created on a different system that uses a convention
  2126. different from its own?
  2127.  
  2128. TIA,
  2129.  
  2130. Steve
  2131.  
  2132. +++++++++++++++++++++++++++
  2133.  
  2134. >From rshapiro@bbn.com (R Shapiro)
  2135. Date: Mon, 20 Nov 1995 13:55:10 -0500
  2136. Organization: BBN
  2137.  
  2138. In article <scipioni-2011951231090001@scipioni.nai.net>, scipioni@nai.net
  2139. (Steve Scipioni) wrote:
  2140.  
  2141. >What is the difference between UNIX, DOS, and Mac text format? 
  2142.  
  2143. Different logical end-of-line marks. Unix uses linefeed (ascii 10), Mac
  2144. uses carriage return (ascii 13), Dos use cr+lf. Line-oriented programs on
  2145. the various platforms typically depend on finding the right mark. Eudora,
  2146. for instance, will not understand message-header and message-separator
  2147. lines if they're terminated ala Unix or Dos.
  2148.  
  2149. -- 
  2150. rs/rshapiro@bbn.com
  2151.  
  2152. +++++++++++++++++++++++++++
  2153.  
  2154. >From mclow@mailhost2.csusm.edu (Marshall Clow)
  2155. Date: Mon, 20 Nov 1995 15:26:58 -0800
  2156. Organization: Aladdin Systems
  2157.  
  2158. In article <scipioni-2011951231090001@scipioni.nai.net>, scipioni@nai.net
  2159. (Steve Scipioni) wrote:
  2160.  
  2161. >What is the difference between UNIX, DOS, and Mac text format?  I thought
  2162. >that ASCII was ASCII.  I'm writing this is BBEdit, and will save it as Mac
  2163. >format, which is how I have the program set up as default.  I'll then open
  2164. >it in Newswatcher, and send it off to this newsgroup. I also use BBEdit to
  2165. >write HTML documents, and my HTML seems to load just fine once it's on the
  2166. >server (a UNIX system).  
  2167. >
  2168. >I have come to understand that the primary difference between the way the
  2169. >three OS's handle text is by way of "end of line conventions."  Just how
  2170. >does a line feed differ from a carriage return?  And is it true that the
  2171. >Mac uses both?  How is text rendered on other systems when it encounters a
  2172. >file that was created on a different system that uses a convention
  2173. >different from its own?
  2174. >
  2175.  
  2176. You are correct.
  2177. The difference between text files on Mac, Unix and Dos are all in the
  2178. end-of-line characters.
  2179.  
  2180. Unix uses the line-feed character   (character 10) to mark the end of line.
  2181. The Mac uses the carriage-return character (character 13)
  2182. DOS uses a line-feed followed by a carriage return!
  2183.  
  2184. -- Marshall
  2185.  
  2186. -- 
  2187. Marshall Clow
  2188. Aladdin Systems
  2189.  
  2190. "They that can give up essential liberty to obtain a little temporary
  2191.  safety deserve neither liberty nor safety." -- Benjamin Franklin
  2192.  _Historical Review of Pennsylvania_, 1759
  2193.  
  2194. +++++++++++++++++++++++++++
  2195.  
  2196. >From pottier@trimaran.ens.fr (Francois Pottier)
  2197. Date: 21 Nov 1995 13:20:42 GMT
  2198. Organization: Ecole Normale Superieure, Paris
  2199.  
  2200. In article <scipioni-2011951231090001@scipioni.nai.net>,
  2201. Steve Scipioni <scipioni@nai.net> wrote:
  2202.  
  2203. >I have come to understand that the primary difference between the way the
  2204. >three OS's handle text is by way of "end of line conventions."
  2205.  
  2206. This is correct. However, another important difference for non-English
  2207. speaking users is in the coding convention for accented letters.
  2208.  
  2209. Dos uses an old IBM convention, Unix and Windows usually use the
  2210. ISO-Latin-1 standard (which doesn't have a code for the French oe,
  2211. damnit) and Apple has its own convention.
  2212.  
  2213. Apple also screwed it up by making its Japanese two-byte character set
  2214. incompatible with its usual 8-bit character set, i.e. you can't have
  2215. French accents on a Mac Japanese system.
  2216.  
  2217.  
  2218.  
  2219.  
  2220. -- 
  2221. Francois
  2222. pottier@dmi.ens.fr
  2223. http://www.eleves.ens.fr:8080/home/pottier/
  2224.  
  2225. +++++++++++++++++++++++++++
  2226.  
  2227. >From Carl R. Osterwald <carl_osterwald@nrel.gov>
  2228. Date: 21 Nov 1995 16:37:05 GMT
  2229. Organization: National Renewable Energy Laboratory
  2230.  
  2231. In article <mclow-2011951526580001@burns.idio.com> Marshall Clow,
  2232. mclow@mailhost2.csusm.edu writes:
  2233.  
  2234. >You are correct.
  2235. >The difference between text files on Mac, Unix and Dos are all in the
  2236. >end-of-line characters.
  2237.  
  2238. Another minor difference is end-of-file handling.  MS-DOS text files end
  2239. at the first control-Z character, regardless of any other data in the
  2240. file after the cntl-Z.  Macintosh files just use the file length
  2241. recorded in the disk directory.
  2242.  
  2243. +++++++++++++++++++++++++++
  2244.  
  2245. >From ja@hamburg.netsurf.de (Johan Almqvist)
  2246. Date: Wed, 22 Nov 1995 16:47:54 +0200
  2247. Organization: none
  2248.  
  2249. In article <mclow-2011951526580001@burns.idio.com>,
  2250. mclow@mailhost2.csusm.edu (Marshall Clow) wrote:
  2251.  
  2252. > In article <scipioni-2011951231090001@scipioni.nai.net>, scipioni@nai.net
  2253. > (Steve Scipioni) wrote:
  2254. > >What is the difference between UNIX, DOS, and Mac text format?  I thought
  2255. > >that ASCII was ASCII.  I'm writing this is BBEdit, and will save it as Mac
  2256. > >format, which is how I have the program set up as default.  I'll then open
  2257. > >it in Newswatcher, and send it off to this newsgroup. I also use BBEdit to
  2258. > >write HTML documents, and my HTML seems to load just fine once it's on the
  2259. > >server (a UNIX system).  
  2260. > >
  2261. > >I have come to understand that the primary difference between the way the
  2262. > >three OS's handle text is by way of "end of line conventions."  Just how
  2263. > >does a line feed differ from a carriage return?  And is it true that the
  2264. > >Mac uses both?  How is text rendered on other systems when it encounters a
  2265. > >file that was created on a different system that uses a convention
  2266. > >different from its own?
  2267. > >
  2268. > You are correct.
  2269. > The difference between text files on Mac, Unix and Dos are all in the
  2270. > end-of-line characters.
  2271. > Unix uses the line-feed character   (character 10) to mark the end of line.
  2272. > The Mac uses the carriage-return character (character 13)
  2273. > DOS uses a line-feed followed by a carriage return!
  2274.  
  2275. There's some more to it: We Europeans have strange Chars whose 8bit codes differ
  2276. from system to system (such as äüößÖÄÜ ë  éèê  Å and so on (if this is
  2277. transferred correctly?!?!?)
  2278.  
  2279. > -- Marshall
  2280. > -- 
  2281. > Marshall Clow
  2282. > Aladdin Systems
  2283. > "They that can give up essential liberty to obtain a little temporary
  2284. >  safety deserve neither liberty nor safety." -- Benjamin Franklin
  2285. >  _Historical Review of Pennsylvania_, 1759
  2286.  
  2287. -- 
  2288. --
  2289. (URL: <http://www.hamburg.netsurf.de/~johan.almqvist>)
  2290. (URL: <mailto:ja@hamburg.netsurf.de>)
  2291.  
  2292. +++++++++++++++++++++++++++
  2293.  
  2294. >From rdwells@mmm.com (Richard Wells )
  2295. Date: 22 Nov 1995 17:54:21 GMT
  2296. Organization: 3M Company
  2297.  
  2298. Carl R. Osterwald <carl_osterwald@nrel.gov> wrote:
  2299. >In article <mclow-2011951526580001@burns.idio.com> Marshall Clow,
  2300. >mclow@mailhost2.csusm.edu writes:
  2301. >
  2302. >>You are correct.
  2303. >>The difference between text files on Mac, Unix and Dos are all in the
  2304. >>end-of-line characters.
  2305. >
  2306. >Another minor difference is end-of-file handling.  MS-DOS text files end
  2307. >at the first control-Z character, regardless of any other data in the
  2308. >file after the cntl-Z.  Macintosh files just use the file length
  2309. >recorded in the disk directory.
  2310.  
  2311. Actually, this is no longer true.  No DOS or Windows program worth
  2312. its salt depends on finding a ctrl-z character to mark EOF.  Of
  2313. course, the number of DOS/Windows worth their salt is an open
  2314. question in this group (:-).
  2315.  
  2316. In fact, the only program I can think of that uses ctrl-z to mark
  2317. the end of file is COMMAND.COM, whose COPY command will stop upon
  2318. finding a ctrl-z in the input (unless you specify /b).  Just one
  2319. more charming DOS idiotsyncracy.
  2320.  
  2321. I think the original reason for using ctrl-z was compatibility with
  2322. CP/M, which only kept track of the number of 128-byte blocks allocated
  2323. to a file, but not the actual file length.
  2324.  
  2325.  
  2326.  
  2327. +++++++++++++++++++++++++++
  2328.  
  2329. >From jwbaxter@olympus.net (John W. Baxter)
  2330. Date: Wed, 22 Nov 1995 18:52:04 -0800
  2331. Organization: Townsend Communications
  2332.  
  2333. In article <scipioni-2011951231090001@scipioni.nai.net>, scipioni@nai.net
  2334. (Steve Scipioni) wrote:
  2335.  
  2336. > What is the difference between UNIX, DOS, and Mac text format?  I thought
  2337. > that ASCII was ASCII.
  2338.  
  2339. ASCII is ASCII, and only defines the character values from 0x00 throu
  2340. 0x7F.  End-of-line is a separate issue...all ASCII defines is the
  2341. characters, including CR as 0x0D, LF as 0x0A, record, field, group, and
  2342. ??? separators (the RS, GS, FS, ?S) characters in the general area of 0x1C
  2343. or so (left over from punched paper tape, where a "line" was one row
  2344. across the tape, ie one character usually).
  2345.  
  2346. Line ends aren't part of ASCII.  Neither are the characters from 0x80
  2347. through 0xFF.
  2348.  
  2349.    --John
  2350.  
  2351. -- 
  2352.   "This item is not available because it cannot be removed."
  2353. John W. Baxter    Port Ludlow, WA     jwbaxter@olympus.net
  2354.  
  2355. +++++++++++++++++++++++++++
  2356.  
  2357. >From d_spacey@icrf.icnet.uk (Dylan the Hippy Wabbit)
  2358. Date: 27 Nov 1995 12:51:53 GMT
  2359. Organization: Imperial Cancer Research Fund
  2360.  
  2361.  In article <scipioni-2011951231090001@scipioni.nai.net>, scipioni@nai.net
  2362. (Steve Scipioni) wrote:
  2363.  
  2364. > > What is the difference between UNIX, DOS, and Mac text format?  I thought
  2365. > > that ASCII was ASCII.
  2366.  
  2367. Macs reading PC clone text puts a  black box at every LF character,
  2368. Windows with Mac text tries to put it all on one line.  Why doesn't PC
  2369. Exchange deal with translation of a text file automatically?
  2370.  
  2371. Of course Mac, Dos/Windows, and Un*x ( who owns that this week?) aren't
  2372. all the systems in the world.  I gather many IBM mainframes use EDBIC,
  2373. which bears no resemblance to ASCII whatsoever.
  2374.  
  2375. Dave Spacey
  2376.  
  2377. -- 
  2378. Don't underestimate the abacus......it requires no power, can be made with any materials you have to hand, and never goes bing in the middle of an important piece of work.   (Many thanks to Douglas Adams.)
  2379.  
  2380. +++++++++++++++++++++++++++
  2381.  
  2382. >From rac@intrigue.com (Robert Coie)
  2383. Date: Wed, 29 Nov 1995 13:02:47 -0800
  2384. Organization: Intrigue Corporation
  2385.  
  2386. In article <48sjna$3fg@nef.ens.fr>, pottier@trimaran.ens.fr (Francois
  2387. Pottier) wrote:
  2388.  
  2389. : Apple also screwed it up by making its Japanese two-byte character set
  2390. : incompatible with its usual 8-bit character set, i.e. you can't have
  2391. : French accents on a Mac Japanese system.
  2392.  
  2393. Agreed, you run into trouble with Japanese fonts, but the Japanese system
  2394. has all the Roman fonts of the U.S. system.  Does the French system have
  2395. extra fonts missing from U.S. English?  In any case, French accents have
  2396. worked perfectly well for me on every KanjiTalk version I have used (back
  2397. to 6.0) as long as I make sure to use Roman fonts.
  2398.  
  2399. I think you're being too hard on Apple:  I support the choice of Shift-JIS
  2400. for Japanese encoding because it allows context-free mixing of 7-bit ASCII
  2401. and Japanese and was largely compatible with the NEC 9800 series, which
  2402. had a huge share of the personal computer market in Japan when KanjiTalk
  2403. 1.0 came out.  Using the >$80 characters for accents &c was also IMHO the
  2404. right decision when it was made.  
  2405.  
  2406. The problem is that mixing text that uses the >$80 range in radically
  2407. different ways is not tenable unless extra information is stored, such as
  2408. a script code (as has been possible since Styled TextEdit and the Script
  2409. Manager made their debut).  Until all characters are at least two bytes
  2410. wide (as in Unicode), such conflicts are unavoidable, and the Mac OS does
  2411. the best job of minimizing the impact of these difficulties of any system
  2412. I have worked with.
  2413.  
  2414. Before DOS/V (2 or 3 years ago), you couldn't run English DOS on most
  2415. Japanese PCs, and lots of English software just wouldn't run.  With DOS/V
  2416. you have to restart to switch languages.  English Windows 3.1 won't run on
  2417. top of Japanese DOS and vice versa, and many English Windows apps won't
  2418. run under Japanese windows, so again you have to restart frequently to
  2419. switch languages.  Some Japanese characters are forbidden in DOS
  2420. filenames.  I don't know how Windows 95 handles these issues (the Japanese
  2421. version just shipped last week).  With Japanese X-Windows, the burden for
  2422. setting scripts lies largely on the user, and Unix Japanese character
  2423. encoding varies from vendor to vendor.  Moving documents from DEC Ultrix
  2424. to a Sun requires reencoding all Japanese text, for example.
  2425.  
  2426. On the MacOS,  one can switch from writing English to Japanese with one
  2427. keystroke, mix Japanese, English, and French in the same document and
  2428. never have to restart.  Although there are some exceptions and annoyances,
  2429. virtually all software written to run under the U.S. Mac OS at least works
  2430. under KanjiTalk and most programs even allow entry of Japanese even if the
  2431. programmer made no effort at all to support such.
  2432.  
  2433. Robert Coie
  2434. Implementor, Intrigue Corporation
  2435. rac@intrigue.com
  2436.  
  2437. +++++++++++++++++++++++++++
  2438.  
  2439. >From pottier@trimaran.ens.fr (Francois Pottier)
  2440. Date: 30 Nov 1995 01:26:19 GMT
  2441. Organization: Ecole Normale Superieure, Paris
  2442.  
  2443. In article <rac-2911951302470001@intrigue.intrigue.com>,
  2444. Robert Coie <rac@intrigue.com> wrote:
  2445.  
  2446. >I think you're being too hard on Apple:
  2447.  
  2448. Um, you're right, this solution was the best one since it allowed mixing
  2449. 7 bit ASCII characters with Japanese. And French accents can be obtained
  2450. by explicitly selecting a Roman font. The only remaining problem is that
  2451. you can't have French accents in file names, because the Japanese Finder
  2452. uses a Japanese font for file names.
  2453.  
  2454. Thanks for setting things straight,
  2455.  
  2456. -- 
  2457. Francois
  2458. pottier@dmi.ens.fr
  2459. http://www.eleves.ens.fr:8080/home/pottier/
  2460.  
  2461. +++++++++++++++++++++++++++
  2462.  
  2463. >From bill@scconsult.com (Bill Stewart-Cole)
  2464. Date: Tue, 21 Nov 1995 23:17:43 -0600
  2465. Organization: ZOG
  2466.  
  2467. In article <scipioni-2011951231090001@scipioni.nai.net>, scipioni@nai.net
  2468. (Steve Scipioni) wrote:
  2469.  
  2470. >What is the difference between UNIX, DOS, and Mac text format?  I thought
  2471. >that ASCII was ASCII.  
  2472.  
  2473. ASCII is ASCII is a 7-bit encoding. Past 127 in an 8-bit byte, what you
  2474. get can vary, a lot. But that's not really what you are talking about.
  2475.  
  2476. >I'm writing this is BBEdit, and will save it as Mac
  2477. >format, which is how I have the program set up as default.  I'll then open
  2478. >it in Newswatcher, and send it off to this newsgroup. I also use BBEdit to
  2479. >write HTML documents, and my HTML seems to load just fine once it's on the
  2480. >server (a UNIX system).  
  2481. >
  2482. >I have come to understand that the primary difference between the way the
  2483. >three OS's handle text is by way of "end of line conventions."  Just how
  2484. >does a line feed differ from a carriage return?  And is it true that the
  2485. >Mac uses both?  How is text rendered on other systems when it encounters a
  2486. >file that was created on a different system that uses a convention
  2487. >different from its own?
  2488.  
  2489. This is actually the real area of variation. 
  2490.  
  2491. The Mac uses a carriage return (ASCII 13) to end lines. Actually, the more
  2492. common reality is that NOTHING ends lines on a Mac, because your text
  2493. usually wraps to a window. CR is more commonly a paragraph ending. This is
  2494. why with some plain text editors you get huge lines when opening a text
  2495. file made with SimpleText or many word processors. 
  2496.  
  2497. DOS uses BOTH a carriage return then a line feed (ASCII 10) to break
  2498. lines. With Windows, this often really means paragraph breaks. 
  2499.  
  2500. Unix systems actually vary a little. I believe some use LF+CR, some CR+LF,
  2501. some just CR. The most common is ( I THINK) LF+CR
  2502.  
  2503. The reason Unices (plural of Unix?) can vary is that there is a defined
  2504. standard for the "network virtual terminal" emulation used to do things
  2505. like telnet, and it is CR+LF. In addition, every other text-based Unix
  2506. session is done thru the tty devices, that get associated with whatever
  2507. other termional emulation is used. Hence, no matter what a file looks like
  2508. on disk, when you show it on your screen thru a terminal session, you get
  2509. whatever the terminal eulation says is the right line break. 
  2510.  
  2511. The origin of this is the venerable teletype. On a teletype, a carriage
  2512. return is a distinct function from a line feed. Remember manual
  2513. typewriters? (No? am I getting OLD?)  The movement of the carriage back to
  2514. the start is not necessarily accompanied by a roll of the platen, and vice
  2515. versa. Teletypes are not, like video terminals, dependent on lines that
  2516. are filled to the left. Using CR and LF independently, things like
  2517. strikethru and doublestrike text and data-efficient 
  2518. transmissions of things
  2519.                            like
  2520.                                     this 
  2521.                                              were possible (without lots
  2522. of spaces sent at 75 baud) Hence the line break became 2 characters in
  2523. terminal-oriented operating systems.
  2524.  
  2525. -- 
  2526. Bill Stewart-Cole
  2527. What is Stewart-Cole Consulting?
  2528. Hell if I know. I'll find out when I finish the web page. 
  2529. Current projected date: 12/1. I'm not saying what year
  2530.  
  2531. ---------------------------
  2532.  
  2533. End of C.S.M.P. Digest
  2534. **********************
  2535.